Skip to content

Commit 23bfeb6

Browse files
committed
fix: strip trailing slash from BACKEND_URL to resolve 404 in proxy
1 parent 16e9d73 commit 23bfeb6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/frontend/src/app/api/proxy/[...path]

packages/frontend/src/app/api/proxy/[...path]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Example: GET /api/proxy/repos → GET http://127.0.0.1:3001/api/v1/repos
1010
*/
1111

12-
const BACKEND_URL = process.env.BACKEND_URL ?? "http://127.0.0.1:3001";
12+
const BACKEND_URL = (process.env.BACKEND_URL ?? "http://127.0.0.1:3001").replace(/\/+$/, "");
1313

1414
export async function GET(
1515
request: Request,

0 commit comments

Comments
 (0)