mirror of https://github.com/Chocobozzz/PeerTube
make HSTS opt-in and leave it to the reverse-proxy
parent
20c3a59e2c
commit
6328da8c01
|
@ -55,7 +55,8 @@ app.set('trust proxy', CONFIG.TRUST_PROXY)
|
||||||
app.use(helmet({
|
app.use(helmet({
|
||||||
frameguard: {
|
frameguard: {
|
||||||
action: 'deny' // we only allow it for /videos/embed, see server/controllers/client.ts
|
action: 'deny' // we only allow it for /videos/embed, see server/controllers/client.ts
|
||||||
}
|
},
|
||||||
|
hsts: false
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// ----------- Database -----------
|
// ----------- Database -----------
|
||||||
|
|
|
@ -44,7 +44,11 @@ server {
|
||||||
gzip_types text/css text/html application/javascript;
|
gzip_types text/css text/html application/javascript;
|
||||||
gzip_vary on;
|
gzip_vary on;
|
||||||
|
|
||||||
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
|
# Enable HSTS
|
||||||
|
# Tells browsers to stick with HTTPS and never visit the insecure HTTP
|
||||||
|
# version. Once a browser sees this header, it will only visit the site over
|
||||||
|
# HTTPS for the next 2 years: (read more on hstspreload.org)
|
||||||
|
#add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
|
||||||
|
|
||||||
access_log /var/log/nginx/peertube.example.com.access.log;
|
access_log /var/log/nginx/peertube.example.com.access.log;
|
||||||
error_log /var/log/nginx/peertube.example.com.error.log;
|
error_log /var/log/nginx/peertube.example.com.error.log;
|
||||||
|
|
Loading…
Reference in New Issue