Files
console/docker/nginx.conf
T
Torsten Dittmann e055719503 Update docker/nginx.conf
Co-authored-by: Fabian Gruber <1951610+basert@users.noreply.github.com>
2025-04-22 17:48:04 +02:00

39 lines
1.1 KiB
Nginx Configuration File

map $sent_http_content_type $cc_header {
default "public, max-age=31536000";
text/html "no-cache";
}
server {
listen 80;
server_name localhost;
# serve compressed file if filename.gz exists
gzip_static on;
location = /console/service-worker.js {
root /usr/share/nginx/html;
add_header Cache-Control "public, max-age=30" always;
}
location /console {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri /console/index.html;
add_header Cache-Control $cc_header always;
# Deny IE browsers from going into quirks mode
add_header X-UA-Compatible "IE=Edge";
# X-Frame-Options is to prevent from clickJacking attack
add_header X-Frame-Options SAMEORIGIN;
# This header enables the Cross-site scripting (XSS) filter
add_header X-XSS-Protection "1; mode=block;";
# disable content-type sniffing on some browsers.
add_header X-Content-Type-Options nosniff;
}
location / {
absolute_redirect off;
return 301 /console;
}
}