mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-02-01 15:55:28 +00:00
Update WSGI example
This commit is contained in:
parent
66fe653063
commit
d573d4e5d7
@ -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)
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user