forked from mirrors/akkoma
example configs: remove obsolete CSP configuration
This commit is contained in:
parent
f516e317ea
commit
057a9017b3
4 changed files with 0 additions and 36 deletions
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue