mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Tweak media proxying
This commit is contained in:
parent
9e631f9a25
commit
0edf03c8c1
1 changed files with 1 additions and 1 deletions
2
app.py
2
app.py
|
@ -289,7 +289,7 @@ def proxy(scheme: str, url: str) -> Any:
|
||||||
if k.lower() not in ["host", "cookie", "", "x-forwarded-for", "x-real-ip"]
|
if k.lower() not in ["host", "cookie", "", "x-forwarded-for", "x-real-ip"]
|
||||||
and not k.lower().startswith("broxy-")
|
and not k.lower().startswith("broxy-")
|
||||||
}
|
}
|
||||||
req_headers["Host"] = urlparse(url).netloc
|
# req_headers["Host"] = urlparse(url).netloc
|
||||||
resp = requests.get(url, stream=True, headers=req_headers)
|
resp = requests.get(url, stream=True, headers=req_headers)
|
||||||
app.logger.info(f"proxied req {url} {req_headers}: {resp!r}")
|
app.logger.info(f"proxied req {url} {req_headers}: {resp!r}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue