feat: add Dockerfile and custom nginx configuration

This commit is contained in:
Stefan Imhoff
2024-04-04 11:30:26 +02:00
parent ec35430d10
commit 34fb89dac5
2 changed files with 58 additions and 0 deletions

28
nginx.conf Normal file
View File

@@ -0,0 +1,28 @@
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
# Error 404
error_page 404 /404.html;
# General headers applied to all routes
add_header X-Frame-Options "DENY";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
add_header Referrer-Policy "no-referrer-when-downgrade";
add_header Permissions-Policy "interest-cohort=()";
# Special handling for /sw.js
location = /sw.js {
add_header cache-control "max-age=0, no-cache, no-store, must-revalidate";
}
# Handling missing pages
try_files $uri $uri/ /index.html;
}