From 8f4d04eee1e654d26a8b39994b30925be0148392 Mon Sep 17 00:00:00 2001 From: Alexis Tacnet Date: Wed, 26 Nov 2025 11:51:53 +0100 Subject: [PATCH] feat: add static function middleware support of basepath --- .../src/staticFunctionMiddleware.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/start-static-server-functions/src/staticFunctionMiddleware.ts b/packages/start-static-server-functions/src/staticFunctionMiddleware.ts index 2a077de3e80..1e91f2452d7 100644 --- a/packages/start-static-server-functions/src/staticFunctionMiddleware.ts +++ b/packages/start-static-server-functions/src/staticFunctionMiddleware.ts @@ -116,7 +116,9 @@ const fetchItem = async ({ let result: any = staticClientCache?.get(url) - result = await fetch(url, { + const basePath = process.env.TSS_ROUTER_BASEPATH! + const prefixedUrl = path.join(basePath, url) + result = await fetch(prefixedUrl, { method: 'GET', }) .then((r) => r.json())