Skip to content

Commit

Permalink
fix(rate limiter): http verbs must align with served routes (speckles…
Browse files Browse the repository at this point in the history
  • Loading branch information
iainsproat authored Feb 12, 2024
1 parent f831c2d commit d7402d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/server/modules/core/services/ratelimiter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ 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/login' = 'GET /auth/local/login',
'POST /auth/local/login' = 'POST /auth/local/login',
'GET /auth/azure' = 'GET /auth/azure',
'GET /auth/gh' = 'GET /auth/gh',
'GET /auth/goog' = 'GET /auth/goog',
'GET /auth/oidc' = 'GET /auth/oidc',
'GET /auth/azure/callback' = 'GET /auth/azure/callback',
'POST /auth/azure/callback' = 'POST /auth/azure/callback',
'GET /auth/gh/callback' = 'GET /auth/gh/callback',
'GET /auth/goog/callback' = 'GET /auth/goog/callback',
'GET /auth/oidc/callback' = 'GET /auth/oidc/callback'
Expand Down Expand Up @@ -179,7 +179,7 @@ export const LIMITS: RateLimiterOptions = {
duration: 1 * TIME.minute
}
},
'GET /auth/local/login': {
'POST /auth/local/login': {
regularOptions: {
limitCount: getIntFromEnv('RATELIMIT_GET_AUTH', '4'),
duration: 10 * TIME.minute
Expand Down Expand Up @@ -229,7 +229,7 @@ export const LIMITS: RateLimiterOptions = {
duration: 30 * TIME.minute
}
},
'GET /auth/azure/callback': {
'POST /auth/azure/callback': {
regularOptions: {
limitCount: getIntFromEnv('RATELIMIT_GET_AUTH', '4'),
duration: 10 * TIME.minute
Expand Down

0 comments on commit d7402d8

Please sign in to comment.