Repository navigation
fix(backend): restore default DB pool size of 2 #454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0129606
56b638c
6d2f10b
5aa0f10
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,10 +20,16 @@ export const authAdminRoles = { | |
| // email-sending endpoints (3 per 60s) by default. These add limits for the | ||
| // token/OTP verification endpoints it leaves on the generic bucket, so OTPs | ||
| // cannot be guessed by cycling new codes. Per client IP; see proxyConfig. | ||
| export const authRateLimitRules = { | ||
| export const buildAuthRateLimitRules = (appEnv: string | undefined = process.env.APP_ENV) => ({ | ||
| '/email-otp/verify-email': { window: 60, max: 10 }, | ||
| '/email-otp/check-verification-otp': { window: 60, max: 10 }, | ||
| '/email-otp/reset-password': { window: 60, max: 10 }, | ||
| '/reset-password': { window: 60, max: 10 }, | ||
| '/magic-link/verify': { window: 60, max: 10 }, | ||
| }; | ||
| // The dev post-deploy E2E run signs in from one runner IP across parallel | ||
| // workers, which the default 3-per-10s sign-in limit throttles. Staging and | ||
| // production keep the default. | ||
| ...(appEnv === 'dev' ? { '/sign-in/email': { window: 10, max: 200 } } : {}), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| }); | ||
|
|
||
| export const authRateLimitRules = buildAuthRateLimitRules(); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: dculussoftwares/dculus-forms
Length of output: 3278
Script executed:
Repository: dculussoftwares/dculus-forms
Length of output: 36118
Script executed:
Repository: dculussoftwares/dculus-forms
Length of output: 16072
Stub
APP_ENVfor the unset-default assertion.Passing
undefinedusesprocess.env.APP_ENV. If the local test process inheritsAPP_ENV=dev, the builder adds/sign-in/emailand this assertion fails. The unit-test setup and inspected CI workflows do not setAPP_ENV, so this is a local-environment risk, not a configured CI failure. Stub it as unset and restore it after the test.Suggested fix