diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2021-12-02 09:14:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-02 09:14:54 +0100 |
commit | 5fc44b57f8da090baccd7e4ea7d03773190e4e87 (patch) | |
tree | 5ce47e6194b8bc69e39459adef116eb32a12e0e1 /server/controllers/client.ts | |
parent | decbd0b63bf14b55c265b0faee18521e4b0e1e76 (diff) | |
download | PeerTube-5fc44b57f8da090baccd7e4ea7d03773190e4e87.tar.gz PeerTube-5fc44b57f8da090baccd7e4ea7d03773190e4e87.tar.zst PeerTube-5fc44b57f8da090baccd7e4ea7d03773190e4e87.zip |
Add header Vary Accept-Language (#4588)
* nginx: add header Vary Accept-Language
solves #3647
* Revert "nginx: add header Vary Accept-Language"
This reverts commit 90dccf53247882ad30904e4c950b745c4e859e01.
* add resp header Vary Accept-Language
solves #3647
* don't add vary header to embed page
Diffstat (limited to 'server/controllers/client.ts')
-rw-r--r-- | server/controllers/client.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/controllers/client.ts b/server/controllers/client.ts index 703166c01..2157ae533 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts | |||
@@ -138,31 +138,31 @@ async function generateEmbedHtmlPage (req: express.Request, res: express.Respons | |||
138 | async function generateWatchHtmlPage (req: express.Request, res: express.Response) { | 138 | async function generateWatchHtmlPage (req: express.Request, res: express.Response) { |
139 | const html = await ClientHtml.getWatchHTMLPage(req.params.id + '', req, res) | 139 | const html = await ClientHtml.getWatchHTMLPage(req.params.id + '', req, res) |
140 | 140 | ||
141 | return sendHTML(html, res) | 141 | return sendHTML(html, res, true) |
142 | } | 142 | } |
143 | 143 | ||
144 | async function generateWatchPlaylistHtmlPage (req: express.Request, res: express.Response) { | 144 | async function generateWatchPlaylistHtmlPage (req: express.Request, res: express.Response) { |
145 | const html = await ClientHtml.getWatchPlaylistHTMLPage(req.params.id + '', req, res) | 145 | const html = await ClientHtml.getWatchPlaylistHTMLPage(req.params.id + '', req, res) |
146 | 146 | ||
147 | return sendHTML(html, res) | 147 | return sendHTML(html, res, true) |
148 | } | 148 | } |
149 | 149 | ||
150 | async function generateAccountHtmlPage (req: express.Request, res: express.Response) { | 150 | async function generateAccountHtmlPage (req: express.Request, res: express.Response) { |
151 | const html = await ClientHtml.getAccountHTMLPage(req.params.nameWithHost, req, res) | 151 | const html = await ClientHtml.getAccountHTMLPage(req.params.nameWithHost, req, res) |
152 | 152 | ||
153 | return sendHTML(html, res) | 153 | return sendHTML(html, res, true) |
154 | } | 154 | } |
155 | 155 | ||
156 | async function generateVideoChannelHtmlPage (req: express.Request, res: express.Response) { | 156 | async function generateVideoChannelHtmlPage (req: express.Request, res: express.Response) { |
157 | const html = await ClientHtml.getVideoChannelHTMLPage(req.params.nameWithHost, req, res) | 157 | const html = await ClientHtml.getVideoChannelHTMLPage(req.params.nameWithHost, req, res) |
158 | 158 | ||
159 | return sendHTML(html, res) | 159 | return sendHTML(html, res, true) |
160 | } | 160 | } |
161 | 161 | ||
162 | async function generateActorHtmlPage (req: express.Request, res: express.Response) { | 162 | async function generateActorHtmlPage (req: express.Request, res: express.Response) { |
163 | const html = await ClientHtml.getActorHTMLPage(req.params.nameWithHost, req, res) | 163 | const html = await ClientHtml.getActorHTMLPage(req.params.nameWithHost, req, res) |
164 | 164 | ||
165 | return sendHTML(html, res) | 165 | return sendHTML(html, res, true) |
166 | } | 166 | } |
167 | 167 | ||
168 | async function generateManifest (req: express.Request, res: express.Response) { | 168 | async function generateManifest (req: express.Request, res: express.Response) { |