mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-09 13:51:57 -04:00
Refactor existing code to add the configured domain to connect-src
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
98b0bf25d2
commit
d7986b1920
4 changed files with 29 additions and 20 deletions
|
@ -1,12 +1,13 @@
|
|||
const config = require('./config')
|
||||
const { v4: uuidv4 } = require('uuid')
|
||||
const { buildDomainOriginWithProtocol } = require('./config/buildDomainOriginWithProtocol')
|
||||
|
||||
const CspStrategy = {}
|
||||
|
||||
const defaultDirectives = {
|
||||
defaultSrc: ['\'none\''],
|
||||
baseUri: ['\'self\''],
|
||||
connectSrc: ['\'self\''],
|
||||
connectSrc: ['\'self\'', buildDomainOriginWithProtocol(config, 'ws')],
|
||||
fontSrc: ['\'self\''],
|
||||
manifestSrc: ['\'self\''],
|
||||
frameSrc: ['\'self\'', 'https://player.vimeo.com', 'https://www.slideshare.net/slideshow/embed_code/key/', 'https://www.youtube.com'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue