- Dockerfile: add NEXT_PUBLIC_LOOPS_FORM_ID build arg for Loops waitlist integration - nginx.conf: add RSS feed MIME type, Permissions-Policy header, remove _next/static special case (redundant with static asset catch-all) Co-Authored-By: Paperclip <noreply@paperclip.ing>
33 lines
941 B
Nginx Configuration File
33 lines
941 B
Nginx Configuration File
server {
|
|
listen 8080;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Static routes — trailing slash handled by next export + trailingSlash: true
|
|
location / {
|
|
try_files $uri $uri/ $uri.html =404;
|
|
}
|
|
|
|
# Long-lived cache for hashed assets
|
|
location ~* \.(js|css|png|jpg|webp|avif|svg|ico|woff2|woff|ttf)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# RSS feed — correct MIME type
|
|
location = /blog/rss.xml {
|
|
add_header Content-Type "application/rss+xml; charset=utf-8";
|
|
}
|
|
|
|
# Security headers
|
|
add_header X-Frame-Options "SAMEORIGIN";
|
|
add_header X-Content-Type-Options "nosniff";
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin";
|
|
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()";
|
|
|
|
# Compression
|
|
gzip on;
|
|
gzip_types text/plain text/css application/javascript application/json image/svg+xml application/xml;
|
|
gzip_min_length 1024;
|
|
}
|