Tweak media proxy
This commit is contained in:
parent
31902ddb46
commit
d035e521d3
1 changed files with 2 additions and 1 deletions
3
app.py
3
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)
|
||||
|
|
Loading…
Reference in a new issue