From 28d7e3049e8f014e86a7385209a577bd89d70867 Mon Sep 17 00:00:00 2001 From: Feiko van Dijk Date: Sat, 21 Feb 2026 18:47:18 +0100 Subject: [PATCH 1/2] fix: preserve /api/ prefix in proxy_pass The API registers all routes with /api/ prefix (e.g. /api/csrf-token, /api/games, /api/user). The trailing slash on proxy_pass was stripping the prefix, causing all API routes to return 404. --- user-dashboard/default.conf.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user-dashboard/default.conf.template b/user-dashboard/default.conf.template index f5912b1..2200b0a 100644 --- a/user-dashboard/default.conf.template +++ b/user-dashboard/default.conf.template @@ -14,7 +14,7 @@ server { } location /api/ { - proxy_pass ${BACKEND_URL}/; + proxy_pass ${BACKEND_URL}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; From f82cc708e46b244d4b50a840d25d4fef99beb0d1 Mon Sep 17 00:00:00 2001 From: Feiko van Dijk Date: Sat, 21 Feb 2026 18:58:27 +0100 Subject: [PATCH 2/2] fix: broaden location directive to match /api without trailing slash Addresses PR review comment: location /api matches both /api and /api/... requests, preventing 404s for edge-case API calls. --- user-dashboard/default.conf.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user-dashboard/default.conf.template b/user-dashboard/default.conf.template index 2200b0a..0a615e4 100644 --- a/user-dashboard/default.conf.template +++ b/user-dashboard/default.conf.template @@ -13,7 +13,7 @@ server { try_files $uri $uri/ /index.html; } - location /api/ { + location /api { proxy_pass ${BACKEND_URL}; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr;