b7439b23e3
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.
31 lines
643 B
Plaintext
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;
|
|
}
|
|
}
|