diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index 3633cc2..aeda057 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -57,7 +57,12 @@ server { location / { set $ui_upstream "ui"; - proxy_pass http://$ui_upstream:3000/; + # No trailing-slash URI: with a VARIABLE upstream, a trailing "/" makes + # nginx send "/" to the UI for every sub-path (assets, /i/), so + # the app's index HTML is returned for /_next/static/*.css (200 text/html) + # → the whole UI renders unstyled and client routing dies. Omit the URI so + # the full request path is preserved, exactly like the /api/ block above. + proxy_pass http://$ui_upstream:3000; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;