From 929389cf6397211cc7359be7f0408804f97717c6 Mon Sep 17 00:00:00 2001 From: neptune Date: Sun, 23 Jul 2023 00:45:03 -0400 Subject: Usar IP correcto entregado por el webserver --- cgi/weabot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgi/weabot.py b/cgi/weabot.py index 2efee41..86c86fe 100755 --- a/cgi/weabot.py +++ b/cgi/weabot.py @@ -38,7 +38,7 @@ class weabot(object): logging.basicConfig(filename='weabot.log', format='%(asctime)s %(levelname)s %(message)s', level=Settings.LOG_LEVEL) self.environ = environ - self.ip = self.environ["HTTP_X_REAL_IP"] + self.ip = self.environ.get("HTTP_X_REAL_IP", self.environ.get("REMOTE_ADDR")) if self.environ["PATH_INFO"].startswith("/weabot.py/"): self.environ["PATH_INFO"] = self.environ["PATH_INFO"][11:] -- cgit v1.2.1-18-gbd029