# How its wsgi\_flask\_app.py supposed to work?

**URL:** <https://discourse.mitmproxy.org/t/how-its-wsgi-flask-app-py-supposed-to-work/665>\
**Category:** help\
**Created:** [October 22, 2017, 8:39am UTC](https://discourse.mitmproxy.org/t/how-its-wsgi-flask-app-py-supposed-to-work/665 "2017-10-22T08:39:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yeradis](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/yeradis/32/216_2.png) [@yeradis](https://discourse.mitmproxy.org/u/yeradis)\
**Post date:** [October 22, 2017, 8:39am UTC](https://discourse.mitmproxy.org/t/how-its-wsgi-flask-app-py-supposed-to-work/665/1 "2017-10-22T08:39:17Z")

</div>

Hello

I´m trying to use the example provided at [https://github.com/mitmproxy/mitmproxy/blob/master/examples/simple/wsgi\_flask\_app.py](https://github.com/mitmproxy/mitmproxy/blob/master/examples/simple/wsgi_flask_app.py)

But i´m not able to make it work

My idea is to use this as the starting point to mock server enpoint responses  
but dont know how to run the provided example

I mean, i´m running it with the -s parameter for mitmdump and mitmproxy but with no result,  
when going to the [example.com](http://example.com) domain shows the original page ☹

i have configured the proxy at the system level and i have checked that if there is no running one of the mentioned commands there is no navigation… so yes the proxy is correctly configured

what i´m missing?

thanks

---

<div class="post-metadata">

**Author:** ![yeradis](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/yeradis/32/216_2.png) [@yeradis](https://discourse.mitmproxy.org/u/yeradis)\
**Post date:** [October 22, 2017, 8:43am UTC](https://discourse.mitmproxy.org/t/how-its-wsgi-flask-app-py-supposed-to-work/665/2 "2017-10-22T08:43:46Z")

</div>

Nevermind, just realized that the example is wrong

should perform the action ad the “start()” event

now i´m it in this way:

```
networksetup -setwebproxy Wi-Fi 127.0.0.1 8080
networksetup -setwebproxystate Wi-Fi on

mitmdump -v -s app.py

networksetup -setwebproxystate Wi-Fi off

```

That inside script and running with `sudo` to be able to change the system proxy, when killed the mitmdump, disable proxy
