Files
homepage/nginx.conf
T
ducoterra 28feb0e50e
Build and Push Container / build-and-push (push) Successful in 21s
clean up nginx.conf
2026-05-28 14:03:22 -04:00

27 lines
789 B
Nginx Configuration File

server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self';" always;
# Gzip compression
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript;
gzip_min_length 256;
gzip_vary on;
location / {
try_files $uri $uri/ /index.html;
}
# Custom error pages
error_page 404 /index.html;
}