aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-07-16 09:02:08 +0200
committerRigel Kent <par@rigelk.eu>2018-07-17 12:03:31 +0200
commitd00e2393d4269c0b4e280753e5f82ac06bd218c6 (patch)
tree93b25f059422413e8d81beddec4d256228f6c687 /server.ts
parenta7dbc7dfc7a84b419a9b55d4a89e9a6e12384ae1 (diff)
downloadPeerTube-d00e2393d4269c0b4e280753e5f82ac06bd218c6.tar.gz
PeerTube-d00e2393d4269c0b4e280753e5f82ac06bd218c6.tar.zst
PeerTube-d00e2393d4269c0b4e280753e5f82ac06bd218c6.zip
selective route permission to use embeds with x-frame-deny
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/server.ts b/server.ts
index a6052faed..26750802c 100644
--- a/server.ts
+++ b/server.ts
@@ -15,6 +15,7 @@ import * as express from 'express'
15import * as morgan from 'morgan' 15import * as morgan from 'morgan'
16import * as cors from 'cors' 16import * as cors from 'cors'
17import * as cookieParser from 'cookie-parser' 17import * as cookieParser from 'cookie-parser'
18import * as helmet from 'helmet'
18 19
19process.title = 'peertube' 20process.title = 'peertube'
20 21
@@ -48,6 +49,13 @@ if (errorMessage !== null) {
48// Trust our proxy (IP forwarding...) 49// Trust our proxy (IP forwarding...)
49app.set('trust proxy', CONFIG.TRUST_PROXY) 50app.set('trust proxy', CONFIG.TRUST_PROXY)
50 51
52// Security middlewares
53app.use(helmet({
54 frameguard: {
55 action: 'deny'
56 }
57}))
58
51// ----------- Database ----------- 59// ----------- Database -----------
52 60
53// Initialize database and models 61// Initialize database and models