aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorbeth92 <bethtownsend92@gmail.com>2020-01-20 13:25:30 -0500
committerGitHub <noreply@github.com>2020-01-20 13:25:30 -0500
commitd573d4e5d744f823890695cf324b02c324984098 (patch)
tree7873ec4dc81e72c85190ec84feddea0c4baa1efc /examples
parent66fe6530631bae9371401f5a86cf4be797107e5c (diff)
downloadmitmproxy-d573d4e5d744f823890695cf324b02c324984098.tar.gz
mitmproxy-d573d4e5d744f823890695cf324b02c324984098.tar.bz2
mitmproxy-d573d4e5d744f823890695cf324b02c324984098.zip
Update WSGI example
Diffstat (limited to 'examples')
-rw-r--r--examples/simple/wsgi_flask_app.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/simple/wsgi_flask_app.py b/examples/simple/wsgi_flask_app.py
index 4be38000..cdbd750c 100644
--- a/examples/simple/wsgi_flask_app.py
+++ b/examples/simple/wsgi_flask_app.py
@@ -13,13 +13,13 @@ app = Flask("proxapp")
def hello_world() -> str:
return 'Hello World!'
-
-def load(l):
+addons = [
# Host app at the magic domain "proxapp.local" on port 80. Requests to this
# domain and port combination will now be routed to the WSGI app instance.
- return wsgiapp.WSGIApp(app, "proxapp.local", 80)
-
+ wsgiapp.WSGIApp(app, "proxapp.local", 80)
+
# SSL works too, but the magic domain needs to be resolvable from the mitmproxy machine due to mitmproxy's design.
# mitmproxy will connect to said domain and use serve its certificate (unless --no-upstream-cert is set)
# but won't send any data.
# mitmproxy.ctx.master.apps.add(app, "example.com", 443)
+]