Last active
August 29, 2015 14:23
-
-
Save cahna/b2b44ef186d571388b18 to your computer and use it in GitHub Desktop.
Simple Python Proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: ascii -*- | |
from webob.dec import wsgify | |
from wsgiproxy import HostProxy | |
from wsgiref.simple_server import make_server | |
@wsgify | |
def application(req): | |
return HostProxy('http://example.com') | |
if __name__ == '__main__': | |
httpd = make_server('', 8051, application) | |
httpd.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment