v2.5.0: disable web admin static cache

This commit is contained in:
Виталий Литвинов
2026-04-24 22:37:52 +03:00
parent d9e4831e44
commit dc7452930a

View File

@@ -572,7 +572,7 @@ class AdminHandler(BaseHTTPRequestHandler):
mime = mimetypes.guess_type(str(path))[0] or "application/octet-stream"
self.send_response(200)
self.send_header("Content-Type", mime)
self.send_header("Cache-Control", "no-store" if path.name == "index.html" else "public, max-age=3600")
self.send_header("Cache-Control", "no-store")
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)