Cache control

This commit is contained in:
Bob Mottram 2017-12-19 12:10:29 +00:00
parent 930c35098a
commit 99013eedbc
1 changed files with 5 additions and 0 deletions

View File

@ -421,6 +421,11 @@ function install_cryptpad_main {
echo '' >> $cryptpad_nginx_site echo '' >> $cryptpad_nginx_site
echo ' index index.html;' >> $cryptpad_nginx_site echo ' index index.html;' >> $cryptpad_nginx_site
echo '' >> $cryptpad_nginx_site echo '' >> $cryptpad_nginx_site
echo ' if ($args ~ ver=) {' >> $cryptpad_nginx_site
echo ' set $cacheControl max-age=31536000;' >> $cryptpad_nginx_site
echo ' }' >> $cryptpad_nginx_site
echo ' add_header Cache-Control $cacheControl;' >> $cryptpad_nginx_site
echo '' >> $cryptpad_nginx_site
echo ' add_header X-XSS-Protection "1; mode=block";' >> $cryptpad_nginx_site echo ' add_header X-XSS-Protection "1; mode=block";' >> $cryptpad_nginx_site
echo ' add_header X-Content-Type-Options nosniff;' >> $cryptpad_nginx_site echo ' add_header X-Content-Type-Options nosniff;' >> $cryptpad_nginx_site
echo ' add_header X-Frame-Options SAMEORIGIN;' >> $cryptpad_nginx_site echo ' add_header X-Frame-Options SAMEORIGIN;' >> $cryptpad_nginx_site