mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
13 lines
344 B
Python
13 lines
344 B
Python
"""
|
|
Mirror all web pages.
|
|
|
|
Useful if you are living down under.
|
|
"""
|
|
from mitmproxy import http
|
|
|
|
|
|
def response(flow: http.HTTPFlow) -> None:
|
|
assert flow.response # make type checker happy
|
|
reflector = b"<style>body {transform: scaleX(-1);}</style></head>"
|
|
flow.response.content = flow.response.content.replace(b"</head>", reflector)
|