Skip to content

Commit 22ef4ad

Browse files
committed
Engine rate limiter: whitelist engine worker-actions
1 parent d55d358 commit 22ef4ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/webapp/app/services/engineRateLimit.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export const engineRateLimiter = authorizationRateLimitMiddleware({
2424
stale: 60_000 * 20, // Date is stale after 20 minutes
2525
},
2626
pathMatchers: [/^\/engine/],
27-
// Allow /api/v1/tasks/:id/callback/:secret
28-
pathWhiteList: [],
27+
// Regex allow any path starting with /engine/v1/worker-actions/
28+
pathWhiteList: [/^\/engine\/v1\/worker-actions\/.*/],
2929
log: {
3030
rejections: env.RUN_ENGINE_RATE_LIMIT_REJECTION_LOGS_ENABLED === "1",
3131
requests: env.RUN_ENGINE_RATE_LIMIT_REQUEST_LOGS_ENABLED === "1",

0 commit comments

Comments
 (0)