Update
Some checks failed
DevPlace CI / test (push) Has been cancelled

This commit is contained in:
retoor 2026-06-12 21:42:32 +02:00
parent 575bde1ff5
commit df2d713a45

View File

@ -317,6 +317,10 @@ async def add_security_headers(request: Request, call_next):
if not response.headers.get("X-Robots-Tag"): if not response.headers.get("X-Robots-Tag"):
response.headers["X-Robots-Tag"] = "index, follow" response.headers["X-Robots-Tag"] = "index, follow"
response.headers["X-Content-Type-Options"] = "nosniff" response.headers["X-Content-Type-Options"] = "nosniff"
if request.url.path.startswith("/admin"):
response.headers["Cache-Control"] = "no-store, no-cache, must-revalidate, max-age=0"
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "0"
return response return response