Files
coffee/nginx.conf
Julien Calixte f278c015b5 Fix duplicate Content-Type on client-metadata.json
Nginx sets application/json automatically for .json files via
MIME types; the explicit header caused a duplicate that broke
ATProto OAuth client metadata fetching.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 23:08:38 +01:00

31 lines
725 B
Nginx Configuration File

server {
listen 3000;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Serve client-metadata.json with correct Content-Type
location = /client-metadata.json {
add_header Access-Control-Allow-Origin *;
}
# SPA fallback
location / {
try_files $uri $uri/ /index.html;
}
# Cache static assets
location ~* \.(js|css|png|jpg|svg|ico|woff2)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# No cache for service worker
location = /sw.js {
add_header Cache-Control "no-store";
}
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
}