aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2020-01-27 22:47:11 +0100
committerGitHub <noreply@github.com>2020-01-27 22:47:11 +0100
commit9253a6c6a551c9dc776dafcccba086d45e669d6f (patch)
tree8dc5e605e49b8ce68476d151b2060cfeadd17124
parent66fe6530631bae9371401f5a86cf4be797107e5c (diff)
parentf5b76d6230d0e2a123b362348552b38ae463a8ca (diff)
downloadmitmproxy-9253a6c6a551c9dc776dafcccba086d45e669d6f.tar.gz
mitmproxy-9253a6c6a551c9dc776dafcccba086d45e669d6f.tar.bz2
mitmproxy-9253a6c6a551c9dc776dafcccba086d45e669d6f.zip
Merge pull request #3792 from beth92/patch-1
Update WSGI example
-rw-r--r--examples/simple/wsgi_flask_app.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/simple/wsgi_flask_app.py b/examples/simple/wsgi_flask_app.py
index 4be38000..bbde6913 100644
--- a/examples/simple/wsgi_flask_app.py
+++ b/examples/simple/wsgi_flask_app.py
@@ -14,12 +14,12 @@ 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)
+]