Files
gateway-gamers.net/sites/scouting/scouting.gateway-gamers.net.conf
T

54 lines
2.2 KiB
Plaintext
Raw Normal View History

2026-08-06 10:25:31 -05:00
server {
listen 80;
listen [::]:80;
server_name scouting.gateway-gamers.net;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name scouting.gateway-gamers.net;
root /var/www/domains/gateway-gamers.net/scouting;
index index.html;
# SSL — managed by Certbot
ssl_certificate /etc/letsencrypt/live/scouting.gateway-gamers.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/scouting.gateway-gamers.net/privkey.pem;
2026-08-06 10:25:31 -05:00
# include /etc/letsencrypt/options-ssl-nginx.conf;
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
# Hide nginx version
server_tokens off;
# Security headers
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;
# style-src needs 'unsafe-inline': the app sets bar-chart widths via
# inline style="width:X%" through innerHTML, which CSP's style-src
# blocks without it (script-src stays locked down — this only affects
# CSS, and nothing here renders untrusted external content into a
# style attribute).
# script-src/connect-src/frame-src additions are for "Generate Matrix":
# Google Identity Services (accounts.google.com) for the sign-in popup,
# and the Drive/Sheets REST APIs the browser calls directly afterward.
add_header Content-Security-Policy "default-src 'self'; script-src 'self' https://accounts.google.com; style-src 'self' 'unsafe-inline'; connect-src 'self' https://newprod-api.bestcoastpairings.com https://www.googleapis.com https://sheets.googleapis.com https://accounts.google.com https://oauth2.googleapis.com; frame-src https://accounts.google.com; img-src 'self' data:;" always;
2026-08-06 10:25:31 -05:00
location /images/ {
alias /var/www/domains/gateway-gamers.net/shared/images/;
}
location = /footer.html {
alias /var/www/domains/gateway-gamers.net/shared/footer.html;
}
2026-08-06 10:25:31 -05:00
location / {
try_files $uri $uri/ =404;
}
}