Skip to main content

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


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 details)

Uploaded Source

File details

Details for the file wsgim-rip-0.1.0.tar.gz.

File metadata

  • Download URL: wsgim-rip-0.1.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wsgim-rip-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a33945b5a8db93ffb0b202f45472334bec2ed0e6170a4c91caafdf467a8239b1
MD5 a63e216d730b66cf1b02c5c52e311fe9
BLAKE2b-256 e369c6c30ea73193a8286b89a7d5bc6b81bca0778b84642596a4eb91ccaaaa0c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page