Explorar o código

Silence 404 proxy errors

Zed hai 1 ano
pai
achega
5edaea2359
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/routes/media.nim

+ 2 - 1
src/routes/media.nim

@@ -37,7 +37,8 @@ proc proxyMedia*(req: jester.Request; url: string): Future[HttpCode] {.async.} =
   try:
     let res = await client.get(url)
     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
 
     let hashed = $hash(url)