mirror of
https://github.com/zedeus/nitter.git
synced 2025-03-04 10:01:24 +00:00
Silence 404 proxy errors
This commit is contained in:
parent
c0f2eea276
commit
5edaea2359
1 changed files with 2 additions and 1 deletions
|
@ -37,7 +37,8 @@ proc proxyMedia*(req: jester.Request; url: string): Future[HttpCode] {.async.} =
|
||||||
try:
|
try:
|
||||||
let res = await client.get(url)
|
let res = await client.get(url)
|
||||||
if res.status != "200 OK":
|
if res.status != "200 OK":
|
||||||
echo "[media] Proxying failed, status: $1, url: $2" % [res.status, url]
|
if res.status != "404 Not Found":
|
||||||
|
echo "[media] Proxying failed, status: $1, url: $2" % [res.status, url]
|
||||||
return Http404
|
return Http404
|
||||||
|
|
||||||
let hashed = $hash(url)
|
let hashed = $hash(url)
|
||||||
|
|
Loading…
Reference in a new issue