We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7b1089 commit 30c0cdcCopy full SHA for 30c0cdc
packages/frameworks-express/src/index.ts
@@ -206,5 +206,7 @@ export async function getSession(
206
}
207
208
function getBasePath(req: e.Request) {
209
- return req.baseUrl.split(req.params.path[0])[0].replace(/\/$/, "")
+ const paramKey = Object.keys(req.params)[0]
210
+ const paramValue = req.params[paramKey][0]
211
+ return req.baseUrl.split(paramValue)[0].replace(/\/$/, "")
212
0 commit comments