From 6a6fe467e1cc6e71f54ebeb641708271bb7e3db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20F=C3=B6rtsch?= Date: Fri, 6 Feb 2026 21:50:51 +0100 Subject: [PATCH] fix API routing: remove /api prefix in Express routes Uberspace web backend removes /api prefix before forwarding to Express, so routes must not include /api. Changed from app.all('/api/*') to app.all('/*'). /health route is defined first, so it takes precedence. Fixes 404 errors when calling Steam API from production. Co-Authored-By: Claude --- server/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/index.js b/server/index.js index b0a8727..973cc95 100644 --- a/server/index.js +++ b/server/index.js @@ -19,9 +19,10 @@ app.get("/health", (req, res) => { res.json({ status: "ok" }); }); -// Proxy for Steam API - exactly like the worker -app.all("/api/*", async (req, res) => { - const path = req.url.replace("/api", ""); +// Proxy for Steam API +// Note: Uberspace removes /api prefix, so we get / here +app.all("/*", async (req, res) => { + const path = req.url; const steamUrl = `https://store.steampowered.com${path}`; console.log(`Proxying: ${req.method} ${steamUrl}`);