From c5f5bf79929b22889a3b4c7372c163901ea38546 Mon Sep 17 00:00:00 2001 From: Iain Sproat <68657+iainsproat@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:49:12 +0000 Subject: [PATCH] fix(rate limiter): use correct paths (#2036) --- packages/server/modules/core/services/ratelimiter.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/server/modules/core/services/ratelimiter.ts b/packages/server/modules/core/services/ratelimiter.ts index 8246c2d00f..dbe275171f 100644 --- a/packages/server/modules/core/services/ratelimiter.ts +++ b/packages/server/modules/core/services/ratelimiter.ts @@ -29,14 +29,14 @@ export enum RateLimitAction { 'GET /objects/:streamId/:objectId' = 'GET /objects/:streamId/:objectId', 'GET /objects/:streamId/:objectId/single' = 'GET /objects/:streamId/:objectId/single', 'POST /graphql' = 'POST /graphql', - 'GET /auth/local' = 'GET /auth/local', + 'GET /auth/local/login' = 'GET /auth/local/login', 'GET /auth/azure' = 'GET /auth/azure', 'GET /auth/gh' = 'GET /auth/gh', - 'GET /auth/google' = 'GET /auth/google', + 'GET /auth/goog' = 'GET /auth/goog', 'GET /auth/oidc' = 'GET /auth/oidc', 'GET /auth/azure/callback' = 'GET /auth/azure/callback', 'GET /auth/gh/callback' = 'GET /auth/gh/callback', - 'GET /auth/google/callback' = 'GET /auth/google/callback', + 'GET /auth/goog/callback' = 'GET /auth/goog/callback', 'GET /auth/oidc/callback' = 'GET /auth/oidc/callback' } @@ -179,7 +179,7 @@ export const LIMITS: RateLimiterOptions = { duration: 1 * TIME.minute } }, - 'GET /auth/local': { + 'GET /auth/local/login': { regularOptions: { limitCount: getIntFromEnv('RATELIMIT_GET_AUTH', '4'), duration: 10 * TIME.minute @@ -209,7 +209,7 @@ export const LIMITS: RateLimiterOptions = { duration: 30 * TIME.minute } }, - 'GET /auth/google': { + 'GET /auth/goog': { regularOptions: { limitCount: getIntFromEnv('RATELIMIT_GET_AUTH', '4'), duration: 10 * TIME.minute