Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to remove someone in response headers by mitmproxy #3968

Closed
otherbanana opened this issue May 1, 2020 · 3 comments
Closed

How to remove someone in response headers by mitmproxy #3968

otherbanana opened this issue May 1, 2020 · 3 comments
Labels
kind/feature New features / enhancements

Comments

@otherbanana
Copy link

For example I want to remove "Server" in response header

微信图片_20200502000514

Is there a way can acheive this?

@otherbanana otherbanana added the kind/feature New features / enhancements label May 1, 2020
@mhils
Copy link
Member

mhils commented May 1, 2020

refs #3948

@mhils
Copy link
Member

mhils commented May 1, 2020

To answer your question: At the moment, you either do it manually/interactively, or you write a small addon that does just this.

@otherbanana
Copy link
Author

Ok!Thank you so much.
I write a small addon such as:
if flow.request.url.startswith("https://example.com")\
and ('example-header') in flow.response.headers:
del flow.response.headers['example-header']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New features / enhancements
Projects
None yet
Development

No branches or pull requests

2 participants