Skip to content
Browse files

Include REMOTE_ADDR in the environ dict; thanks steamraven.

  • Loading branch information...
1 parent 6eca8c8 commit 4c730b20185ac24e72c6bc8c502a09b32b8907ad @rfk committed Feb 1, 2012
Showing with 4 additions and 0 deletions.
  1. +3 −0 ChangeLog.txt
  2. +1 −0 m2wsgi/io/base.py
View
3 ChangeLog.txt
@@ -1,3 +1,6 @@
+v0.5.2
+
+ * Include REMOTE_ADDR in the WSGI environ dict; thanks steamraven.
v0.5.1
View
1 m2wsgi/io/base.py
@@ -982,6 +982,7 @@ def get_wsgi_environ(self,req,environ=None):
# Let's just hope the client sends a Host header...
environ["SERVER_NAME"] = "localhost"
environ["SERVER_PORT"] = "80"
+ environ["REMOTE_ADDR"] = unquote(req.headers['x-forwarded-for'])
# Include standard wsgi keys
environ['wsgi.input'] = self.get_input_file(req)
# TODO: 100-continue support?

0 comments on commit 4c730b2

Please sign in to comment.
Something went wrong with that request. Please try again.