fix(GRO-773): raise auth rate-limit threshold and exempt /get-session
Raise the Better Auth rate limit from max:10/window:60 to max:100/window:10 to match library defaults, and exempt /get-session from rate limiting entirely via customRules (returns null = no rate limit check). Both AUTH_DISABLED and production rateLimit blocks updated. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -93,9 +93,12 @@ export async function initAuth(): Promise<void> {
|
||||
baseURL: BETTER_AUTH_URL,
|
||||
rateLimit: {
|
||||
enabled: true,
|
||||
max: 10,
|
||||
window: 60,
|
||||
max: 100,
|
||||
window: 10,
|
||||
storage: "memory",
|
||||
customRules: {
|
||||
"/get-session": false,
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
genericOAuth({
|
||||
@@ -240,9 +243,12 @@ export async function initAuth(): Promise<void> {
|
||||
baseURL: BETTER_AUTH_URL,
|
||||
rateLimit: {
|
||||
enabled: true,
|
||||
max: 10,
|
||||
window: 60,
|
||||
max: 100,
|
||||
window: 10,
|
||||
storage: "memory",
|
||||
customRules: {
|
||||
"/get-session": false,
|
||||
},
|
||||
},
|
||||
account: {
|
||||
storeStateStrategy: "cookie" as const,
|
||||
|
||||
Reference in New Issue
Block a user