This commit is contained in:
Mateusz Gruszczyński
2025-08-29 22:32:22 +02:00
parent 0419ca1d9d
commit 43c9a7006c

6
app.py
View File

@@ -516,13 +516,13 @@ def convert():
if debug_mode:
d("Upstream 304 zwracam 304")
r.close()
add_recent_convert()
add_recent_link(normalized_url, target_ip)
return debug_response(status=304)
resp = Response(status=304)
resp.headers.update(cache_headers(etag, r.headers.get("Last-Modified")))
resp.direct_passthrough = True
r.close()
add_recent_convert()
add_recent_link(normalized_url, target_ip)
return resp
up_etag = r.headers.get("ETag")
@@ -569,7 +569,7 @@ def convert():
resp.headers.update(cache_headers(etag, up_lm))
resp.direct_passthrough = True
redis_client.incr("stats:conversions_success")
add_recent_convert()
add_recent_link(normalized_url, target_ip)
return resp
except requests.exceptions.RequestException as e: