]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Remove uneeded language injection
authorChocobozzz <me@florianbigard.com>
Mon, 11 Oct 2021 12:00:09 +0000 (14:00 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 11 Oct 2021 12:00:09 +0000 (14:00 +0200)
It's already handled by angular build

server/lib/client-html.ts

index 3529acf5eeb8693b3e513fe64daf7be1681bf2bc..84b4ca97def8477dd034e2d85a7366e36c4e8a7e 100644 (file)
@@ -303,7 +303,6 @@ class ClientHtml {
 
     let html = buffer.toString()
 
-    if (paramLang) html = ClientHtml.addHtmlLang(html, paramLang)
     html = ClientHtml.addManifestContentHash(html)
     html = ClientHtml.addFaviconContentHash(html)
     html = ClientHtml.addLogoContentHash(html)
@@ -555,8 +554,7 @@ function sendHTML (html: string, res: express.Response) {
 }
 
 async function serveIndexHTML (req: express.Request, res: express.Response) {
-  if (req.accepts(ACCEPT_HEADERS) === 'html' ||
-      !req.headers.accept) {
+  if (req.accepts(ACCEPT_HEADERS) === 'html' || !req.headers.accept) {
     try {
       await generateHTMLPage(req, res, req.params.language)
       return