# Inline-script sslstrip.py with flow.request.headers in response function

**URL:** <https://discourse.mitmproxy.org/t/inline-script-sslstrip-py-with-flow-request-headers-in-response-function/169>\
**Category:** help\
**Created:** [September 14, 2016, 10:05pm UTC](https://discourse.mitmproxy.org/t/inline-script-sslstrip-py-with-flow-request-headers-in-response-function/169 "2016-09-14T22:05:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phackt](https://avatars.discourse-cdn.com/v4/letter/p/bc79bd/32.png) [@phackt](https://discourse.mitmproxy.org/u/phackt)\
**Post date:** [September 14, 2016, 10:05pm UTC](https://discourse.mitmproxy.org/t/inline-script-sslstrip-py-with-flow-request-headers-in-response-function/169/1 "2016-09-14T22:05:12Z")

</div>

Hello,

You can check here the [sslstrip.py](http://sslstrip.py) script:

1. [https://github.com/mitmproxy/mitmproxy/blob/0.17.x/examples/sslstrip.py](https://github.com/mitmproxy/mitmproxy/blob/0.17.x/examples/sslstrip.py)
2. [https://github.com/mitmproxy/mitmproxy/blob/master/examples/sslstrip.py](https://github.com/mitmproxy/mitmproxy/blob/master/examples/sslstrip.py)

For this script we have in the response function;

def response(flow):  
flow.request.headers.pop(‘Strict-Transport-Security’, None)  
flow.request.headers.pop(‘Public-Key-Pins’, None)

Why flow.request instead of flow.response for these response headers?

Thanks in advance,

---

<div class="post-metadata">

**Author:** ![mhils](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mhils/32/7_2.png) [@mhils](https://discourse.mitmproxy.org/u/mhils)\
**Post date:** [September 14, 2016, 11:06pm UTC](https://discourse.mitmproxy.org/t/inline-script-sslstrip-py-with-flow-request-headers-in-response-function/169/2 "2016-09-14T23:06:12Z")

</div>

Thanks for pointing this out! That very much looks like a bug, would you like to submit a PR that fixes that? 🙂

---

<div class="post-metadata">

**Author:** ![phackt](https://avatars.discourse-cdn.com/v4/letter/p/bc79bd/32.png) [@phackt](https://discourse.mitmproxy.org/u/phackt)\
**Post date:** [September 14, 2016, 11:48pm UTC](https://discourse.mitmproxy.org/t/inline-script-sslstrip-py-with-flow-request-headers-in-response-function/169/3 "2016-09-14T23:48:32Z")

</div>

Ok i will do that.

Thanks,
