example configs: remove obsolete CSP configuration
authorWilliam Pitcock <nenolod@dereferenced.org>
Sun, 11 Nov 2018 06:12:26 +0000 (06:12 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Sun, 11 Nov 2018 06:12:26 +0000 (06:12 +0000)
installation/caddyfile-pleroma.example
installation/pleroma-apache.conf
installation/pleroma.nginx
installation/pleroma.vcl

index 305f2aa793360dae585928b9e038ab573d001095..c34b4704560b0ff06188ceaa82b710eccd89172e 100644 (file)
@@ -22,27 +22,10 @@ example.tld  {
   }
 
   header / {
-    X-XSS-Protection "1; mode=block"
-    X-Frame-Options "DENY"
-    X-Content-Type-Options "nosniff"
-    Referrer-Policy "same-origin"
     Strict-Transport-Security "max-age=31536000; includeSubDomains;"
     Expect-CT "enforce, max-age=2592000"
-    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://{host}; upgrade-insecure-requests;"
   }
 
-  # If you do not want remote frontends to be able to access your Pleroma backend server, remove these lines.
-  # If you want to allow all origins access, remove the origin lines.
-  # To use this directive, you need the http.cors plugin for Caddy.
-  cors / {
-    origin https://halcyon.example.tld
-    origin https://pinafore.example.tld
-    methods POST,PUT,DELETE,GET,PATCH,OPTIONS
-    allowed_headers Authorization,Content-Type,Idempotency-Key
-    exposed_headers Link,X-RateLimit-Reset,X-RateLimit-Limit,X-RateLimit-Remaining,X-Request-Id
-  }
-  # Stop removing lines here.
-
   # If you do not want to use the mediaproxy function, remove these lines.
   # To use this directive, you need the http.cache plugin for Caddy.
   cache {
index fb777983ef53eb9604da6d7ffcc1c6d12213e1e6..cbb165064e55480bfb24b890bf360640fc7bad7f 100644 (file)
@@ -34,12 +34,6 @@ CustomLog ${APACHE_LOG_DIR}/access.log combined
     SSLCompression          off
     SSLSessionTickets       off
 
-    Header always set X-Xss-Protection "1; mode=block"
-    Header always set X-Frame-Options "DENY"
-    Header always set X-Content-Type-Options "nosniff"
-    Header always set Referrer-Policy same-origin
-    Header always set 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://${servername}; upgrade-insecure-requests;"
-
     # Uncomment this only after you get HTTPS working.
     # Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
 
index 9b7419497d46a00228df76c1f230e378118503aa..62c99383ffcb760eb85edac6f4877f731ba9c412 100644 (file)
@@ -60,14 +60,6 @@ server {
     client_max_body_size 16m;
 
     location / {
-        add_header X-XSS-Protection "1; mode=block" always;
-        add_header X-Permitted-Cross-Domain-Policies "none" always;
-        add_header X-Frame-Options "DENY" always;
-        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 *; 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://$server_name; upgrade-insecure-requests;" always;
-
         # Uncomment this only after you get HTTPS working.
         # add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
 
index 74490be2aa251a85d402a26a71cccb8c3b8a063d..5d80c6f44f9b760bc25d251bf04f2b9e2fb0fd37 100644 (file)
@@ -121,11 +121,6 @@ sub vcl_pipe {
 }
 
 sub vcl_deliver {
-  set resp.http.X-Frame-Options = "DENY";
-  set resp.http.X-XSS-Protection = "1; mode=block";
-  set resp.http.X-Content-Type-Options = "nosniff";
-  set resp.http.Referrer-Policy = "same-origin";
-  set resp.http.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://" + req.http.host + "; upgrade-insecure-requests;";
   # Uncomment this only after you get HTTPS working.
   # set resp.http.Strict-Transport-Security= "max-age=31536000; includeSubDomains";
 }