Files
hantim-server/docker/nginx/conf.d/garage.hantim.net.conf
T
timothykim cc07a34489
Deploy nginx / deploy (push) Successful in 3s
Deploy nginx / test (push) Successful in 54s
fix nginx security headers not being applied to https responses
nginx add_header inheritance meant X-Content-Type-Options and X-Frame-Options
were silently dropped from all https server blocks. moved all security headers
into a shared snippet (security-headers.inc) included per server block. added
pytest-based header verification that auto-discovers sites from conf files.
2026-03-20 15:11:56 -04:00

31 lines
643 B
Plaintext

# Garage admin API
server {
listen 80;
listen [::]:80;
server_name garage.hantim.net;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://garage.hantim.net$request_uri;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name garage.hantim.net;
ssl_certificate /etc/letsencrypt/live/garage.hantim.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/garage.hantim.net/privkey.pem;
include /etc/nginx/conf.d/security-headers.inc;
location / {
proxy_pass http://garage:3903;
}
}