Skip to content

Commit a3a8891

Browse files
bjaggclaude
andcommitted
Issue LIF-Initiative#880: Add SPA fallback nginx config to Advisor frontend
Add nginx.conf with try_files fallback to index.html, matching the MDR frontend pattern. Without this, client-side routes like /login return a 404 from nginx, leaving users on a blank error page after a failed login attempt. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 94c9e9e commit a3a8891

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

frontends/lif_advisor_app/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ FROM nginx:1.26-alpine AS serve
2525
# Copy built files from the previous stage
2626
COPY --from=build /app/dist /usr/share/nginx/html/
2727

28-
# Optionally: copy custom nginx config - for SPA, you'll need this, similar to mdr-frontend
29-
# COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf
28+
# Copy custom nginx config for SPA fallback routing
29+
COPY nginx.conf /etc/nginx/conf.d/default.conf
3030

3131
# Expose default Nginx port
3232
EXPOSE 80
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
server {
2+
listen 80;
3+
4+
root /usr/share/nginx/html;
5+
index index.html;
6+
7+
location / {
8+
try_files $uri /index.html;
9+
}
10+
}

0 commit comments

Comments
 (0)