mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 03:10:38 +09:00
fix: use Express 5 wildcard syntax for better-auth handler route
Express 5 (path-to-regexp v8+) dropped support for the *paramName wildcard syntax from Express 4. The route registered as '/api/auth/*authPath' silently fails to match any sub-path, causing every /api/auth/* request to return 404 instead of reaching the better-auth handler. Fixes: #2898 Change the route to '/api/auth/{*authPath}', the correct named catch-all syntax in Express 5.
This commit is contained in:
parent
6c8569156c
commit
a8638619e5
2 changed files with 48 additions and 1 deletions
|
|
@ -133,7 +133,7 @@ export async function createApp(
|
|||
});
|
||||
});
|
||||
if (opts.betterAuthHandler) {
|
||||
app.all("/api/auth/*authPath", opts.betterAuthHandler);
|
||||
app.all("/api/auth/{*authPath}", opts.betterAuthHandler);
|
||||
}
|
||||
app.use(llmRoutes(db));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue