diff --git a/nginx.conf b/nginx.conf index f215ae8..72b3f2f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -37,9 +37,15 @@ http { add_header X-XSS-Protection "1; mode=block" always; add_header Referrer-Policy "no-referrer-when-downgrade" always; - # API routes - serve as JSON + # API routes - serve as JSON (Next.js static export creates files without extensions) + location /api/fonts { + default_type application/json; + add_header Cache-Control "public, max-age=3600"; + try_files /api/fonts =404; + } + location ~ ^/api/ { - add_header Content-Type application/json; + default_type application/json; add_header Cache-Control "public, max-age=3600"; try_files $uri =404; }