MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / buildAuthRateLimit

Function buildAuthRateLimit

apps/api/src/config/security/security.ts:120–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118};
119
120export const buildAuthRateLimit = () => {
121 const context = buildRateLimitContext();
122 const generator = buildKeyGenerator();
123
124 return rateLimit({
125 max: env.AUTH_RATE_LIMIT_MAX,
126 duration: env.AUTH_RATE_LIMIT_WINDOW_MS,
127 scoping: "scoped",
128 countFailedRequest: true,
129 ...(context !== undefined && { context }),
130 ...(generator !== undefined && { generator }),
131 });
132};

Callers 1

auth.routes.tsFile · 0.90

Calls 2

buildRateLimitContextFunction · 0.85
buildKeyGeneratorFunction · 0.85

Tested by

no test coverage detected