You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible with the mitmproxy to be able (according to a defined condition) to prevent a request, not send it to the server and optionnaly make a response directly to the client? knowing that I have stream=True
I tried to do this : flow.response = mitmproxy.http.Response.make(403, b"Hello World", {"Content-Type": "text/html"})
But it generates this error : Can't set a response and enable streaming at the same time.
I would like to verify the condition and filter the request satisfying the condition (abort it for example)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
Is it possible with the mitmproxy to be able (according to a defined condition) to prevent a request, not send it to the server and optionnaly make a response directly to the client? knowing that I have
stream=True
I tried to do this :
flow.response = mitmproxy.http.Response.make(403, b"Hello World", {"Content-Type": "text/html"})
But it generates this error :
Can't set a response and enable streaming at the same time.
I would like to verify the condition and filter the request satisfying the condition (abort it for example)
Thank you
Beta Was this translation helpful? Give feedback.
All reactions