Relax form-action content security policy
authorbarrucadu <mike@barrucadu.co.uk>
Fri, 28 Sep 2018 22:17:19 +0000 (22:17 +0000)
committerbarrucadu <mike@barrucadu.co.uk>
Fri, 28 Sep 2018 22:17:19 +0000 (22:17 +0000)
'self' only allows forms submitted to the same origin, which
breaks the "remote follow" form.  To allow remote following,
we want to allow forms to be submitted to any host.

installation/pleroma.nginx

index 37871ea5b5e25b6a57827155bd59499ddcfc0bdb..f648336ca1467385dacff3aac57093d54abe7556 100644 (file)
@@ -77,7 +77,7 @@ server {
         add_header X-Content-Type-Options "nosniff" always;
         add_header Referrer-Policy "same-origin" always;
         add_header X-Download-Options "noopen" always;
-        add_header Content-Security-Policy "default-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; 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;" always;
+        add_header Content-Security-Policy "default-src 'none'; base-uri 'self'; form-action *; frame-ancestors 'none'; 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;" always;
         
         # Uncomment this only after you get HTTPS working.
         # add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;