diff --git a/docker/resume/nginx.conf b/docker/resume/nginx.conf index d36a19c..7827b64 100644 --- a/docker/resume/nginx.conf +++ b/docker/resume/nginx.conf @@ -1,43 +1,31 @@ -worker_processes auto; -pid /run/nginx.pid; +server { + listen 8080 http2; + listen [::]:8080 http2; + listen 8080 quic reuseport; + listen [::]:8080 quic reuseport; + http3_max_concurrent_streams 128; -events { - worker_connections 1024; -} + root /usr/share/nginx/html; + index index.html; -http { - limit_req_zone $binary_remote_addr zone=default:10m rate=20r/s; + server_name colinknapp.com www.colinknapp.com; - server { - listen 8080 http2; - listen [::]:8080 http2; - listen 8080 quic reuseport; - listen [::]:8080 quic reuseport; - http3_max_concurrent_streams 128; + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; + add_header X-Frame-Options "DENY" always; + add_header X-Content-Type-Options "nosniff" always; + add_header Referrer-Policy "no-referrer" always; + add_header Permissions-Policy "geolocation=(), microphone=(), camera=(), payment=()" always; - root /usr/share/nginx/html; - index index.html; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' https://matomo.nixc.us/js/tracker.js https://colinknapp.com/scripts/some-script.js; style-src 'self' 'unsafe-inline' https://colinknapp.com/styles/main.css; img-src 'self' https://colinknapp.com/icons data:; connect-src 'self' https://matomo.nixc.us; font-src 'self' fonts.gstatic.com; base-uri 'self'; form-action 'self';" always; - server_name colinknapp.com www.colinknapp.com; - - add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; - add_header X-Frame-Options "DENY" always; - add_header X-Content-Type-Options "nosniff" always; - add_header Referrer-Policy "no-referrer" always; - add_header Permissions-Policy "geolocation=(), microphone=(), camera=(), payment=()" always; - - add_header Content-Security-Policy "default-src 'self'; script-src 'self' https://matomo.nixc.us/js/tracker.js https://colinknapp.com/scripts/some-script.js; style-src 'self' 'unsafe-inline' https://colinknapp.com/styles/main.css; img-src 'self' https://colinknapp.com/icons data:; connect-src 'self' https://matomo.nixc.us; font-src 'self' fonts.gstatic.com; base-uri 'self'; form-action 'self';" always; - - location ~* \.(js|css|html)$ { - expires 1y; - add_header Cache-Control "public, max-age=31536000, immutable"; - } - - location / { - limit_req zone=default burst=30; - try_files $uri $uri/ =404; - } - - add_header Alt-Svc 'h3-29=":8080"; ma=86400'; + location ~* \.(js|css|html)$ { + expires 1y; + add_header Cache-Control "public, max-age=31536000, immutable"; } + + location / { + try_files $uri $uri/ =404; + } + + add_header Alt-Svc 'h3-29=":8080"; ma=86400'; }