installation/pleroma.nginx: Add Content-Security-Policy
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Tue, 28 Aug 2018 18:54:50 +0000 (20:54 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Tue, 28 Aug 2018 18:54:50 +0000 (20:54 +0200)
Closes: https://git.pleroma.social/pleroma/pleroma/issues/266
installation/pleroma.nginx

index 78327594fbba9eb9a3f033f591080cbaa590dbc3..a333d116cd1b0e15b0786290a955997e7b6c4924 100644 (file)
@@ -77,6 +77,7 @@ server {
         add_header X-Content-Type-Options nosniff;
         add_header Referrer-Policy same-origin;
         add_header X-Download-Options noopen;
+        add_header Content-Security-Policy "default-src 'none'; base-uri 'self'; form-action 'self'; img-src 'self' data: https:; media-src 'self' https:; style-src 'self' 'unsafe-inline'; font-src 'self'; script-src 'self'; connect-src 'self' wss://example.tld; upgrade-insecure-requests;";
         
         # Uncomment this only after you get HTTPS working.
         # add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";