diff options
-rw-r--r-- | examples/simple/wsgi_flask_app.py | 6 | ||||
-rw-r--r-- | mitmproxy/optmanager.py | 3 |
2 files changed, 4 insertions, 5 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) +] diff --git a/mitmproxy/optmanager.py b/mitmproxy/optmanager.py index f42aa645..ac85f83a 100644 --- a/mitmproxy/optmanager.py +++ b/mitmproxy/optmanager.py @@ -320,8 +320,7 @@ class OptManager: update = {} for optname, optval in self.deferred.items(): if optname in self._options: - if isinstance(optval, str): - optval = self.parse_setval(self._options[optname], optval) + optval = self.parse_setval(self._options[optname], optval) update[optname] = optval self.update(**update) for k in update.keys(): |