Some requests blocked by WAF?
My site is behaving super weirdly recently. It appears that some WAF is blocking a huge amount of workers traffic on specific images. As background, my site is using Workers to retreive an image from R2 and apply Image Resizing to it based on certain query parameters.
My site is a CF Pages site as well, with the worker being on a subdomain route.
Certain images are being blocked - the exact urls are:
HOWEVER, if we change the
q=60
into any other value, it becomes accessible again. I'm also only having trouble with some images...
I've turned off all WAF Managed Rules, set Site Security to "Essentially Off" and confirmed no other rules under "Security" are in effect.5 Replies
I'm at my wits end on how only the URL ending in
q=60
can be blocked. Some other images also work just fine too...This is the rule of a trace too - not seeing any concerns here.
ooooo bad cache sounds like it could be a thing.
It does NOT appear in security events.
Which raises even more questions to me!
Hmmm! interesting... I do have caching in between R2 and the worker.
Oh my god.
Oh god i think i know what happened. Bing bot probably tried to index that image, but then got blocked. And then my worker saved the block response into the Cache API...
BINGGGGG!!!!!!!
Hmmm now the question becomes... how do I go clear the Cache API...
Okay good i did do
cache.default
.But is that cleared through the "Purge Everything"?
okay cool. let's me try that! Fingers crossed T_T
Whelp... that did it! I had a second layer of caching in an R2 bucket as well, so nuked that also!
thank you so much for your help @Leo !