add nginx security headers
This commit is contained in:
parent
1f35158211
commit
cf6eac0d0c
|
@ -0,0 +1,5 @@
|
|||
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header Content-Security-Policy-Report-Only "default-src 'self'; font-src *;img-src * data:; script-src *; style-src *;frame-ancestors 'self'";
|
||||
add_header Referrer-Policy "strict-origin";
|
|
@ -156,6 +156,8 @@ if [ ! -f /etc/nginx/conf.d/10-geoblock.conf ]; then
|
|||
cp -f conf/nginx/conf.d/10-geoblock.conf /etc/nginx/conf.d/
|
||||
fi
|
||||
|
||||
cp -f conf/nginx/security.conf /etc/nginx/sites-enabled/
|
||||
|
||||
# touch logfiles that might not exist
|
||||
touch /var/log/nginx/geoipblock.log
|
||||
chown www-data /var/log/nginx/geoipblock.log
|
||||
|
|
Loading…
Reference in New Issue