WSGI middleware for setting real ip.
Project description
WSGI middleware for setting:
environ["REMOTE_ADDR"]
based on:
environ["HTTP_X_FORWARDED_FOR"]
and proxy information.
Install it:
$ pip install wsgim-rip
...
and use it:
from wsgim_rip import RIPMiddleware
wrapped = RIPMiddleware(
app,
internal='10.0.0.0/8',
proxies={
'50.18.213.180': '192.168.0.0/16',
},
))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wsgim-rip-0.1.0.tar.gz
(2.5 kB
view hashes)