rich-painter-47009
02/14/2024, 11:47 AMpulumi
to create cloudflare rate limit rule. here is my code:
export const rateLimitRule = new cloudflare.RateLimit("rate-limit-rule", {
zoneId: <zone-id>,
threshold: 1200,
period: 60, // Time period in seconds to evaluate request count (60 seconds = 1 minute)
action: {
mode: "ban",
timeout: 60,
response: {
contentType: "text/plain",
body: "Exceeded rate limit",
},
},
match: {
request: {
urlPattern: "<http://test.example.com|test.example.com>",
},
},
});
I am using cloudflare pro
plan and I can create the same rule in cloudflare dashboard.
but I get error creating rate limit for zone: ratelimit.api.not_entitled.account (10021)
which seems I am doing something that is not available in pro
plan. can some one help me here?
Thanksquiet-answer-18749
02/14/2024, 10:16 PMrich-painter-47009
02/14/2024, 10:18 PM