diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/client.ts | 10 |
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 @@ | |||
1 | import * as Bluebird from 'bluebird' | 1 | import * as Bluebird from 'bluebird' |
2 | import * as express from 'express' | 2 | import * as express from 'express' |
3 | import * as helmet from 'helmet' | ||
3 | import { join } from 'path' | 4 | import { join } from 'path' |
4 | import * as validator from 'validator' | 5 | import * as validator from 'validator' |
5 | import { escapeHTML, readFileBufferPromise, root } from '../helpers/core-utils' | 6 | import { escapeHTML, readFileBufferPromise, root } from '../helpers/core-utils' |
@@ -30,9 +31,12 @@ clientsRouter.use('/videos/watch/:id', | |||
30 | ) | 31 | ) |
31 | 32 | ||
32 | clientsRouter.use('' + | 33 | clientsRouter.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 | ) | ||
36 | clientsRouter.use('' + | 40 | clientsRouter.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) |