mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-30 09:15:19 +02:00
fix: redirect to /auth/initial-setup after hitting auth rate limit (#3408)
This commit is contained in:
@@ -1338,6 +1338,12 @@ authenticated.get("/ws/round-trip-message/:messageId", checkRoundTripMessage);
|
||||
// Auth routes
|
||||
export const authRouter = Router();
|
||||
unauthenticated.use("/auth", authRouter);
|
||||
|
||||
// Register setup-check BEFORE the global auth rate limiter.
|
||||
// This endpoint is called on every dashboard root page load (pure boolean
|
||||
// read, no secrets) and must not consume the auth rate-limit budget.
|
||||
authRouter.get("/initial-setup-complete", auth.initialSetupComplete);
|
||||
|
||||
authRouter.use(
|
||||
rateLimit({
|
||||
windowMs:
|
||||
@@ -1642,7 +1648,6 @@ authRouter.post("/idp/:idpId/oidc/generate-url", idp.generateOidcUrl);
|
||||
authRouter.post("/idp/:idpId/oidc/validate-callback", idp.validateOidcCallback);
|
||||
|
||||
authRouter.put("/set-server-admin", auth.setServerAdmin);
|
||||
authRouter.get("/initial-setup-complete", auth.initialSetupComplete);
|
||||
authRouter.post("/validate-setup-token", auth.validateSetupToken);
|
||||
|
||||
// Security Key routes
|
||||
|
||||
Reference in New Issue
Block a user