forked from colin/resume
24 lines
1.1 KiB
Nginx Configuration File
24 lines
1.1 KiB
Nginx Configuration File
server {
|
|
listen 8080;
|
|
root /usr/share/nginx/html;
|
|
index resume.html;
|
|
|
|
# Add HSTS header with preload directive
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
|
|
|
# Other 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 Permissions-Policy "camera=(), microphone=(), geolocation=(), accelerometer=(), gyroscope=(), magnetometer=(), payment=(), usb=()" always;
|
|
|
|
# Additional headers (example CSP with nonce for inline content if needed)
|
|
set $nonce $request_id;
|
|
add_header Content-Security-Policy "default-src 'none'; script-src 'self' 'nonce-$nonce' https://matomo.nixc.us; style-src 'self' 'nonce-$nonce' https://colinknapp.com; img-src 'self' https://matomo.nixc.us https://colinknapp.com; frame-ancestors 'self'; base-uri 'self'; form-action 'self';";
|
|
|
|
# Basic location block
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
}
|