From d035e521d3f0fb4f20e15cef996c7879f356ad0c Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sat, 7 Sep 2019 09:47:58 +0200 Subject: [PATCH] Tweak media proxy --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 2259102..58895e3 100644 --- a/app.py +++ b/app.py @@ -271,7 +271,8 @@ def proxy(scheme: str, url: str) -> Any: req_headers = { k: v for k, v in dict(request.headers).items() - if k.lower() not in ["host", "cookie"] + if k.lower() not in ["host", "cookie", "", "x-forwarded-for", "x-real-ip"] + and not k.lower().startswith("broxy-") } req_headers["Host"] = urlparse(url).netloc resp = requests.get(url, stream=True, headers=req_headers)