aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/client.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-14 15:49:36 +0100
committerChocobozzz <me@florianbigard.com>2018-12-17 09:13:22 +0100
commit9aac44236c84f17b14ce35e358a87389766e2743 (patch)
tree7c17980eb31d2951aabe0113138cbd33a9992bdb /server/controllers/client.ts
parenta46934c825d5dea4154fb100abf26ec3bc28d5a4 (diff)
downloadPeerTube-9aac44236c84f17b14ce35e358a87389766e2743.tar.gz
PeerTube-9aac44236c84f17b14ce35e358a87389766e2743.tar.zst
PeerTube-9aac44236c84f17b14ce35e358a87389766e2743.zip
Add video title/description when rendering html
Diffstat (limited to 'server/controllers/client.ts')
-rw-r--r--server/controllers/client.ts18
1 files changed, 8 insertions, 10 deletions
diff --git a/server/controllers/client.ts b/server/controllers/client.ts
index e5bd487f1..f17f2a5d2 100644
--- a/server/controllers/client.ts
+++ b/server/controllers/client.ts
@@ -16,22 +16,20 @@ const testEmbedPath = join(distPath, 'standalone', 'videos', 'test-embed.html')
16 16
17// Special route that add OpenGraph and oEmbed tags 17// Special route that add OpenGraph and oEmbed tags
18// Do not use a template engine for a so little thing 18// Do not use a template engine for a so little thing
19clientsRouter.use('/videos/watch/:id', 19clientsRouter.use('/videos/watch/:id', asyncMiddleware(generateWatchHtmlPage))
20 asyncMiddleware(generateWatchHtmlPage)
21)
22 20
23clientsRouter.use('' + 21clientsRouter.use(
24 '/videos/embed', 22 '/videos/embed',
25 embedCSP, 23 embedCSP,
26 (req: express.Request, res: express.Response, next: express.NextFunction) => { 24 (req: express.Request, res: express.Response) => {
27 res.removeHeader('X-Frame-Options') 25 res.removeHeader('X-Frame-Options')
28 res.sendFile(embedPath) 26 res.sendFile(embedPath)
29 } 27 }
30) 28)
31clientsRouter.use('' + 29clientsRouter.use(
32 '/videos/test-embed', (req: express.Request, res: express.Response, next: express.NextFunction) => { 30 '/videos/test-embed',
33 res.sendFile(testEmbedPath) 31 (req: express.Request, res: express.Response) => res.sendFile(testEmbedPath)
34}) 32)
35 33
36// Static HTML/CSS/JS client files 34// Static HTML/CSS/JS client files
37 35
@@ -90,7 +88,7 @@ export {
90// --------------------------------------------------------------------------- 88// ---------------------------------------------------------------------------
91 89
92async function generateHTMLPage (req: express.Request, res: express.Response, paramLang?: string) { 90async function generateHTMLPage (req: express.Request, res: express.Response, paramLang?: string) {
93 const html = await ClientHtml.getIndexHTML(req, res, paramLang) 91 const html = await ClientHtml.getDefaultHTMLPage(req, res, paramLang)
94 92
95 return sendHTML(html, res) 93 return sendHTML(html, res)
96} 94}