mirror of https://github.com/xwiki-labs/cryptpad
Caddyfile: Split privileged scope
This commit is contained in:
parent
a5095966e5
commit
7fff13850f
|
@ -124,13 +124,21 @@ your-sandbox-domain.com:443 {
|
|||
}
|
||||
|
||||
# Finally, set all the security rules you have composed above.
|
||||
@privilegedScope {
|
||||
@privilegedScope1 {
|
||||
host "your-sandbox-domain.com"
|
||||
path_regexp "^\\/(sheet|doc|presentation)\\/inner.html.*$"
|
||||
}
|
||||
@privilegedScope2 {
|
||||
host "your-sandbox-domain.com"
|
||||
path_regexp "^\\/common\\/onlyoffice\\/.*\\/.*\\.html.*$"
|
||||
}
|
||||
@privilegedScope3 {
|
||||
host "your-sandbox-domain.com"
|
||||
path_regexp "^\\/unsafeiframe\\/inner\\.html.*$"
|
||||
}
|
||||
header @privilegedScope Content-Security-Policy "default-src 'none'; child-src {vars.childSrc}; worker-src {vars.workerSrc}; media-src {vars.mediaSrc}; style-src {vars.styleSrc}; script-src {vars.scriptSrcUnsafe}; connect-src {vars.connectSrc}; font-src {vars.fontSrc}; img-src {vars.imgSrc}; frame-src {vars.frameSrc}; frame-ancestors {vars.frameAncestors}"
|
||||
header @privilegedScope1 Content-Security-Policy "default-src 'none'; child-src {vars.childSrc}; worker-src {vars.workerSrc}; media-src {vars.mediaSrc}; style-src {vars.styleSrc}; script-src {vars.scriptSrcUnsafe}; connect-src {vars.connectSrc}; font-src {vars.fontSrc}; img-src {vars.imgSrc}; frame-src {vars.frameSrc}; frame-ancestors {vars.frameAncestors}"
|
||||
header @privilegedScope2 Content-Security-Policy "default-src 'none'; child-src {vars.childSrc}; worker-src {vars.workerSrc}; media-src {vars.mediaSrc}; style-src {vars.styleSrc}; script-src {vars.scriptSrcUnsafe}; connect-src {vars.connectSrc}; font-src {vars.fontSrc}; img-src {vars.imgSrc}; frame-src {vars.frameSrc}; frame-ancestors {vars.frameAncestors}"
|
||||
header @privilegedScope3 Content-Security-Policy "default-src 'none'; child-src {vars.childSrc}; worker-src {vars.workerSrc}; media-src {vars.mediaSrc}; style-src {vars.styleSrc}; script-src {vars.scriptSrcUnsafe}; connect-src {vars.connectSrc}; font-src {vars.fontSrc}; img-src {vars.imgSrc}; frame-src {vars.frameSrc}; frame-ancestors {vars.frameAncestors}"
|
||||
header ?Content-Security-Policy "default-src 'none'; child-src {vars.childSrc}; worker-src {vars.workerSrc}; media-src {vars.mediaSrc}; style-src {vars.styleSrc}; script-src {vars.scriptSrc}; connect-src {vars.connectSrc}; font-src {vars.fontSrc}; img-src {vars.imgSrc}; frame-src {vars.frameSrc}; frame-ancestors {vars.frameAncestors}"
|
||||
|
||||
# Add support for .mjs files used by pdfjs
|
||||
|
|
Loading…
Reference in New Issue