favicons
This commit is contained in:
@@ -110,9 +110,12 @@ def create_app() -> Flask:
|
||||
|
||||
static_file = request.path.startswith("/static/")
|
||||
tracker_icon = request.path.startswith("/static/tracker_favicons/")
|
||||
favicon_ico = request.path == "/favicon.ico"
|
||||
|
||||
if static_file and not tracker_icon:
|
||||
response.headers["Cache-Control"] = "public, max-age=31536000, immutable"
|
||||
elif favicon_ico:
|
||||
response.headers["Cache-Control"] = "public, max-age=86400"
|
||||
else:
|
||||
response.headers["Cache-Control"] = "no-store, private"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user