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,
|
baseURL: BETTER_AUTH_URL,
|
||||||
rateLimit: {
|
rateLimit: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
max: 10,
|
max: 100,
|
||||||
window: 60,
|
window: 10,
|
||||||
storage: "memory",
|
storage: "memory",
|
||||||
|
customRules: {
|
||||||
|
"/get-session": false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
genericOAuth({
|
genericOAuth({
|
||||||
@@ -240,9 +243,12 @@ export async function initAuth(): Promise<void> {
|
|||||||
baseURL: BETTER_AUTH_URL,
|
baseURL: BETTER_AUTH_URL,
|
||||||
rateLimit: {
|
rateLimit: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
max: 10,
|
max: 100,
|
||||||
window: 60,
|
window: 10,
|
||||||
storage: "memory",
|
storage: "memory",
|
||||||
|
customRules: {
|
||||||
|
"/get-session": false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
account: {
|
account: {
|
||||||
storeStateStrategy: "cookie" as const,
|
storeStateStrategy: "cookie" as const,
|
||||||
|
|||||||
Reference in New Issue
Block a user