aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/client-html.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/client-html.ts')
-rw-r--r--server/lib/client-html.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index b2948254b..360b4667f 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -555,9 +555,13 @@ class ClientHtml {
555 } 555 }
556} 556}
557 557
558function sendHTML (html: string, res: express.Response) { 558function sendHTML (html: string, res: express.Response, localizedHTML: boolean = false) {
559 res.set('Content-Type', 'text/html; charset=UTF-8') 559 res.set('Content-Type', 'text/html; charset=UTF-8')
560 560
561 if (localizedHTML) {
562 res.set('Vary', 'Accept-Language')
563 }
564
561 return res.send(html) 565 return res.send(html)
562} 566}
563 567
@@ -586,5 +590,5 @@ export {
586async function generateHTMLPage (req: express.Request, res: express.Response, paramLang?: string) { 590async function generateHTMLPage (req: express.Request, res: express.Response, paramLang?: string) {
587 const html = await ClientHtml.getDefaultHTMLPage(req, res, paramLang) 591 const html = await ClientHtml.getDefaultHTMLPage(req, res, paramLang)
588 592
589 return sendHTML(html, res) 593 return sendHTML(html, res, true)
590} 594}