forked from cartsnitch/cartsnitch
fix(auth): restore unconditional Better-Auth fallback, add unknown-path test
Remove startsWith('/auth') guard that caused non-auth paths to hang with
no response. Better-Auth already handles /health and /auth/health are
explicitly short-circuited before the handler. Add test asserting unknown
paths receive a terminal response within 1s.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
+2
-5
@@ -28,11 +28,8 @@ const server = createServer(async (req, res) => {
|
||||
return;
|
||||
}
|
||||
|
||||
// All /auth/* routes handled by Better-Auth
|
||||
if (req.url?.startsWith("/auth")) {
|
||||
await handler(req, res);
|
||||
return;
|
||||
}
|
||||
// All other routes handled by Better-Auth (returns 404 for unknown paths)
|
||||
await handler(req, res);
|
||||
});
|
||||
|
||||
server.listen(port, "0.0.0.0", () => {
|
||||
|
||||
Reference in New Issue
Block a user