aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/controllers/client.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/server/controllers/client.ts b/server/controllers/client.ts
index bfdf35021..13ca15e9d 100644
--- a/server/controllers/client.ts
+++ b/server/controllers/client.ts
@@ -1,5 +1,6 @@
1import * as Bluebird from 'bluebird' 1import * as Bluebird from 'bluebird'
2import * as express from 'express' 2import * as express from 'express'
3import * as helmet from 'helmet'
3import { join } from 'path' 4import { join } from 'path'
4import * as validator from 'validator' 5import * as validator from 'validator'
5import { escapeHTML, readFileBufferPromise, root } from '../helpers/core-utils' 6import { escapeHTML, readFileBufferPromise, root } from '../helpers/core-utils'
@@ -30,9 +31,12 @@ clientsRouter.use('/videos/watch/:id',
30) 31)
31 32
32clientsRouter.use('' + 33clientsRouter.use('' +
33 '/videos/embed', (req: express.Request, res: express.Response, next: express.NextFunction) => { 34 '/videos/embed',
34 res.sendFile(embedPath) 35 (req: express.Request, res: express.Response, next: express.NextFunction) => {
35}) 36 res.removeHeader('X-Frame-Options')
37 res.sendFile(embedPath)
38 }
39)
36clientsRouter.use('' + 40clientsRouter.use('' +
37 '/videos/test-embed', (req: express.Request, res: express.Response, next: express.NextFunction) => { 41 '/videos/test-embed', (req: express.Request, res: express.Response, next: express.NextFunction) => {
38 res.sendFile(testEmbedPath) 42 res.sendFile(testEmbedPath)