@@ -153,38 +153,27 @@ export const apiRateLimiter = authorizationRateLimitMiddleware({
153153 limiterConfigOverride : resolveApiRateLimitOverride ,
154154 onResult : recordApiRateLimitObservation ,
155155 pathMatchers : [ / ^ \/ a p i / ] ,
156- // Allow /api/v1/tasks/:id/callback/:secret
157156 pathWhiteList : [
158- "/api/internal/stripe_webhooks" ,
159157 // Keep allowlisted: these CLI endpoints are intentionally unauthenticated,
160158 // so this Authorization-header-keyed limiter would 401 them. They are
161159 // throttled separately by authCodeRateLimiter.server.ts.
162160 "/api/v1/authorization-code" ,
163161 "/api/v1/token" ,
164162 "/api/v1/usage/ingest" ,
165163 "/api/v1/plain/customer-cards" ,
166- / ^ \/ a p i \/ v 1 \/ t a s k s \/ [ ^ / ] + \/ c a l l b a c k \/ [ ^ / ] + $ / , // /api/v1/tasks/$id/callback/$secret
167- / ^ \/ a p i \/ v 1 \/ r u n s \/ [ ^ / ] + \/ t a s k s \/ [ ^ / ] + \/ c a l l b a c k \/ [ ^ / ] + $ / , // /api/v1/runs/$runId/tasks/$id/callback/$secret
168- / ^ \/ a p i \/ v 1 \/ h t t p - e n d p o i n t s \/ [ ^ / ] + \/ e n v \/ [ ^ / ] + \/ [ ^ / ] + $ / , // /api/v1/http-endpoints/$httpEndpointId/env/$envType/$shortcode
169- / ^ \/ a p i \/ v 1 \/ s o u r c e s \/ h t t p \/ [ ^ / ] + $ / , // /api/v1/sources/http/$id
170- / ^ \/ a p i \/ v 1 \/ e n d p o i n t s \/ [ ^ / ] + \/ [ ^ / ] + \/ i n d e x \/ [ ^ / ] + $ / , // /api/v1/endpoints/$environmentId/$endpointSlug/index/$indexHookIdentifier
171164 "/api/v1/timezones" ,
172- "/api/v1/usage/ingest" ,
173165 "/api/v1/auth/jwt/claims" ,
174166 // Dedicated per-run/environment limits prevent a throttled run from draining the API budget.
175167 "/api/v1/auth/oidc/token" ,
176168 // GitHub JWTs are verified and rate limited by the dedicated submission API.
177169 "/api/v1/trusted-deploys/prepare" ,
178170 "/api/v1/trusted-deploys/submit" ,
179- / ^ \/ a p i \/ v 1 \/ r u n s \/ [ ^ / ] + \/ a t t e m p t s $ / , // /api/v1/runs/$runFriendlyId/attempts
180171 / ^ \/ a p i \/ v 1 \/ w a i t p o i n t s \/ t o k e n s \/ [ ^ / ] + \/ c a l l b a c k \/ [ ^ / ] + $ / , // /api/v1/waitpoints/tokens/$waitpointFriendlyId/callback/$hash
181172 ...deploymentApiPaths , // rate limited separately by deploymentRateLimiter
182173 / ^ \/ a p i \/ v \d + \/ d e p l o y m e n t s \/ c u r r e n t $ / , // runtime SDK surface, exempt as before the deploy budget split
183174 // Internal SDK plumbing — packets are presigned-URL handshakes for
184175 // payload uploads (v2 PUT) and downloads (v1 GET), authenticated via
185176 // run-scoped JWT, called once per task/turn boundary by the runtime.
186- // Same shape as `/api/v1/runs/$runFriendlyId/attempts` above; not a
187- // customer-facing surface so customer rate limits shouldn't apply.
188177 / ^ \/ a p i \/ v 1 \/ p a c k e t s \/ / ,
189178 / ^ \/ a p i \/ v 2 \/ p a c k e t s \/ / ,
190179 / ^ \/ a p i \/ v 1 \/ s e s s i o n s \/ [ ^ / ] + \/ s n a p s h o t - u r l $ / ,
0 commit comments