mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
add Content Security Policy (#1252)
* add Content Security Policy * remove reflect-metadata on production builds to get rid of unsafe-eval * fix baseCSP usage * add SRI to CSP * add blob: to media-src * remove SRI * CSP set to reportOnly * adding data: to connect-src CSP * remove block-all-mixed-content * add report-uri support
This commit is contained in:
@@ -53,6 +53,9 @@ if (errorMessage !== null) {
|
||||
app.set('trust proxy', CONFIG.TRUST_PROXY)
|
||||
|
||||
// Security middleware
|
||||
import { baseCSP } from './server/middlewares'
|
||||
|
||||
app.use(baseCSP)
|
||||
app.use(helmet({
|
||||
frameguard: {
|
||||
action: 'deny' // we only allow it for /videos/embed, see server/controllers/client.ts
|
||||
|
||||
Reference in New Issue
Block a user