Skip to content

Instantly share code, notes, and snippets.

@cahna
Last active August 29, 2015 14:23
Show Gist options
  • Save cahna/b2b44ef186d571388b18 to your computer and use it in GitHub Desktop.
Save cahna/b2b44ef186d571388b18 to your computer and use it in GitHub Desktop.
Simple Python Proxy
# -*- 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