Reviewed-on: #285 Co-authored-by: paspo <paolo@asperti.com> Co-committed-by: paspo <paolo@asperti.com>
56 lines
1.6 KiB
Plaintext
56 lines
1.6 KiB
Plaintext
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
server_name _;
|
|
access_log /logs/nginx.access.log main;
|
|
sendfile off;
|
|
root /wwwroot;
|
|
index index.html;
|
|
|
|
location ~ .* {
|
|
add_header X-Frame-Options "SAMEORIGIN";
|
|
add_header X-Content-Type-Options "nosniff";
|
|
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload";
|
|
add_header Content-Security-Policy "default-src 'self'; img-src https://*; child-src 'none';";
|
|
}
|
|
|
|
location ~ ^/feed {
|
|
rewrite ^/feed$ /it/index.xml last;
|
|
rewrite ^/feed/.*$ /it/index.xml last;
|
|
}
|
|
|
|
location ~ /events/elenco/ {
|
|
default_type "text/calendar";
|
|
try_files $uri /it/index.ics;
|
|
}
|
|
|
|
location ~ \.ics$ {
|
|
default_type "text/calendar";
|
|
}
|
|
|
|
location ~ ^/wp\-content/uploads/2008/02/Statuto\.pdf$ {
|
|
return 301 https://bglug.it/it/chi-siamo/Statuto.pdf;
|
|
}
|
|
|
|
location ~ ^/it/.* {
|
|
error_page 404 /it/404.html;
|
|
}
|
|
|
|
location ~ ^/en/.* {
|
|
error_page 404 /en/404.html;
|
|
}
|
|
|
|
location ~ .* {
|
|
error_page 404 /it/404.html;
|
|
}
|
|
}
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js image/x-icon image/svg+xml font/woff2 font/woff application/x-font-woff;
|
|
gzip_disable "msie6";
|
|
|
|
etag on;
|
|
if_modified_since exact;
|
|
add_header Pragma "public";
|
|
add_header Cache-Control "max-age=31536000, public";
|