Browse Source

Improving Collabora Caddy config

Brendan Abolivier 6 years ago
parent
commit
c131387c98
Signed by: Brendan Abolivier <contact@brendanabolivier.com> GPG key ID: 8EF1500759F70623
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      content/your-own-google-drive-docs.md

+ 2
- 2
content/your-own-google-drive-docs.md View File

@@ -406,12 +406,12 @@ collabora.example.tld {
406 406
 
407 407
 	header / {
408 408
 		Strict-Transport-Security "max-age=31536000;"
409
-		Content-Security-Policy "default-src 'none'; frame-src 'self' blob:; connect-src 'self' wss://cloud.example.tld; script-src 'unsafe-inline' 'self'; style-src 'self' 'unsafe-inline'; font-src 'self' data:; object-src blob:; img-src 'self' data: https://cloud.example.tld:443; frame-ancestors https://cloud.example.tld:443"
409
+		Content-Security-Policy "default-src 'none'; frame-src 'self' blob:; connect-src 'self' wss://cloud.example.tld; script-src 'unsafe-inline' 'self'; style-src 'self' 'unsafe-inline'; font-src 'self' data:; object-src blob:; img-src 'self' data: https://cloud.example.tld:443; frame-ancestors https://cloud.example.tld:443 'self'"
410 410
 	}
411 411
 }
412 412
 ```
413 413
 
414
-While the whole file is pretty basic, let's talk about the last instruction, which contains the [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) HTTP header. Because it's a quite complex header, I don't really know the details of how to tweak it to make it work with Collabora Online, and had neither the time nor the motivation to dive into it. Therefore, the header shown here is a plain copy of the one sent by [Nextcloud's demo servers](https://demo.nextcloud.com), where I replaced every instance of `demo.nextcloud.com` with Nextcloud's URL (which, in the example shown here, is `cloud.example.tld`, which you should replace with the domain you gave Nextcloud). It works fine, but I wanted to point out that this part of the configuration isn't my own work.
414
+While the whole file is pretty basic, let's talk about the last instruction, which contains the [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) HTTP header. Because it's a quite complex header, I don't really know the details of how to tweak it to make it work with Collabora Online, and had neither the time nor the motivation to dive into it. Therefore, the header shown here is a plain copy of the one sent by [Nextcloud's demo servers](https://demo.nextcloud.com), where I replaced every instance of `demo.nextcloud.com` with Nextcloud's URL (which, in the example shown here, is `cloud.example.tld`, which you should replace with the domain you gave Nextcloud). I also improved the last part, allowing Collabora to open iframes pointing to itself, which is required for slideshow presentations. It works fine, but I wanted to point out that this part of the configuration isn't my own work.
415 415
 
416 416
 Now let's reload Caddy to let it know of these changes in its configuration:
417 417