Skip to content

bninja/wsgim-rip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wsgim-rip

image

image

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',
     },
))

About

wsgi real-ip middleware

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages