Skip to content

Commit b174ea2

Browse files
committed
Return a 429 for requests from the cloudflare-support-chat.workers.dev Worker
This was a factor in INCIDENT-7622, https://chat.google.com/room/AAQA62fM640/4SgOlopBhVQ/eMKATdwxr6o?cls=10
1 parent f9f0bb6 commit b174ea2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

apps/docs-vectorize/src/docs-vectorize.app.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,14 @@ export class CloudflareDocumentationMCP extends McpAgent<Env, State, Props> {
5353
}
5454
}
5555

56-
export default createApiHandler(CloudflareDocumentationMCP)
56+
const apiHandler = createApiHandler(CloudflareDocumentationMCP)
57+
58+
export default {
59+
fetch: (req: Request, env: unknown, ctx: ExecutionContext) => {
60+
// XXX: Put in place for INCIDENT-7622, https://chat.google.com/room/AAQA62fM640/4SgOlopBhVQ/eMKATdwxr6o?cls=10
61+
if (req.headers.get('cf-worker') === 'cloudflare-support-chat.workers.dev') {
62+
return new Response(null, { status: 429 })
63+
}
64+
return apiHandler.fetch(req, env, ctx)
65+
},
66+
}

0 commit comments

Comments
 (0)