diff --git a/nginx.conf b/nginx.conf index 72b3f2f..9969915 100644 --- a/nginx.conf +++ b/nginx.conf @@ -38,18 +38,13 @@ http { add_header Referrer-Policy "no-referrer-when-downgrade" always; # API routes - serve as JSON (Next.js static export creates files without extensions) - location /api/fonts { + # Use exact match to ensure this takes precedence + location = /api/fonts { default_type application/json; add_header Cache-Control "public, max-age=3600"; try_files /api/fonts =404; } - location ~ ^/api/ { - default_type application/json; - add_header Cache-Control "public, max-age=3600"; - try_files $uri =404; - } - # Cache static assets location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|flf)$ { expires 1y;