feat(server): dont client cache HTML files

Tell the clients to not cache the HTML response.

closes #6393
pull/6402/head
kontrollanten 2024-05-12 07:58:26 +02:00 committed by Chocobozzz
parent 46b45dc51d
commit 2177995056
1 changed files with 1 additions and 0 deletions

View File

@ -54,6 +54,7 @@ class ClientHtml {
function sendHTML (html: string, res: express.Response, localizedHTML: boolean = false) { function sendHTML (html: string, res: express.Response, localizedHTML: boolean = false) {
res.set('Content-Type', 'text/html; charset=UTF-8') res.set('Content-Type', 'text/html; charset=UTF-8')
res.set('Cache-Control', 'max-age=0, no-cache, must-revalidate')
if (localizedHTML) { if (localizedHTML) {
res.set('Vary', 'Accept-Language') res.set('Vary', 'Accept-Language')