unbit/uwsgi — pull request #77 by prymitive (2012-12-06 09:56:50+00:00)
Title: use client address if X-Forwarded-For is missing

With this patch uWSGI will fallback to REMOTE_ADDR if HTTP_X_FORWARDED_FOR is missing but --log-x-forwarded-for was used.
For example if one uses SSL terminator of some sort, than plain HTTP requests won't have X-Forwarded-For, while HTTPS requests might have, we should use X-Forwarded-For only if it is present in headers, if not client address should be used.