Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

WSGI middleware for setting real ip.

Project description

https://travis-ci.org/bninja/wsgim-rip.png https://coveralls.io/repos/bninja/wsgim-rip/badge.png

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

This version
History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
wsgim-rip-0.1.0.tar.gz (2.5 kB) Copy SHA256 hash SHA256 Source None Jul 28, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page