diff options
-rwxr-xr-x | cgi/weabot.py | 2 |
1 files changed, 1 insertions, 1 deletions
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:] |