queue_stopped #3
@@ -110,9 +110,12 @@ def create_app() -> Flask:
|
|||||||
|
|
||||||
static_file = request.path.startswith("/static/")
|
static_file = request.path.startswith("/static/")
|
||||||
tracker_icon = request.path.startswith("/static/tracker_favicons/")
|
tracker_icon = request.path.startswith("/static/tracker_favicons/")
|
||||||
|
favicon_ico = request.path == "/favicon.ico"
|
||||||
|
|
||||||
if static_file and not tracker_icon:
|
if static_file and not tracker_icon:
|
||||||
response.headers["Cache-Control"] = "public, max-age=31536000, immutable"
|
response.headers["Cache-Control"] = "public, max-age=31536000, immutable"
|
||||||
|
elif favicon_ico:
|
||||||
|
response.headers["Cache-Control"] = "public, max-age=86400"
|
||||||
else:
|
else:
|
||||||
response.headers["Cache-Control"] = "no-store, private"
|
response.headers["Cache-Control"] = "no-store, private"
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,7 @@ def favicon_ico():
|
|||||||
current_app.static_folder,
|
current_app.static_folder,
|
||||||
"favicon.svg",
|
"favicon.svg",
|
||||||
mimetype="image/svg+xml",
|
mimetype="image/svg+xml",
|
||||||
max_age=86400,
|
|
||||||
)
|
)
|
||||||
response.headers["Cache-Control"] = "public, max-age=86400"
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user