perf: no cache for fronend page

This commit is contained in:
Junyan Qin
2025-05-17 19:30:26 +08:00
parent 1992934dce
commit 0a9714fbe7

View File

@@ -107,4 +107,8 @@ class HTTPController:
elif path.endswith('.txt'):
mimetype = 'text/plain'
return await quart.send_from_directory(frontend_path, path, mimetype=mimetype)
response = await quart.send_from_directory(frontend_path, path, mimetype=mimetype)
response.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate'
response.headers['Pragma'] = 'no-cache'
response.headers['Expires'] = '0'
return response