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

Hello,

You can check here the sslstrip.py script:

  1. https://github.com/mitmproxy/mitmproxy/blob/0.17.x/examples/sslstrip.py
  2. 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,

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

Ok i will do that.

Thanks,