#Error 500 when activating Security > Bots > Definitely automated = Managed Challenge.

57 messages · Page 1 of 1 (latest)

elfin cove
#

Strange, challenges shouldn't impact anything here - is your Worker being invoked still?

#

got a url i can look at?

steady wadi
#

I can't enable it since my site goes down and its a high traffic site

#

But the script just handles locale redirects when entering domain.com

steady wadi
#

@elfin cove seems like for some reason the Bots Security has a conflict with this worker script.

#

Here you have the logs of the 500 error:

elfin cove
#

Looks like your app isn't logging what the error is

#

though... don't see any catches in your code, so this seems to be from upstream

steady wadi
#

yeah, that should not happen

#

Also not sure why activating the bot protetion causes ANY interference with the worker.

#

I thought that maybe the Challange tries to load some scripts that the scripts are redirected by my worker or something like that

elfin cove
#

Yeah it's weird...

steady wadi
#

Do you know anyone at cloudflare that could assist me?

elfin cove
#

me but i need data to work with :p

steady wadi
#

Ok, can we do private msg for this data?

#

or email

elfin cove
#

Feel free to email me yeah - walshy@

steady wadi
#

@elfin cove Sent! Thanks

elfin cove
#

Ok can confirm it comes from the subrequest, unfortunately I'm unable to repro on my own zone.

Could you re-add the rule but require some query param or special path?

steady wadi
#

Can I activate Bots only on specific routes?

#

I can activate it generally if you want for 1-2 minutes

elfin cove
#

yeah you should be able to do a path = xx in your security rule

steady wadi
#

Weird. It works the WAF rule, but not if I activate it generally in "Security > Bots"

#

Changing the "Allow" here returns 500 Error. Creating a rule in WAF does not

elfin cove
#

hmm interesting

elfin cove
steady wadi
#

Ok

#

Let me know once you are ready

elfin cove
#

Ready

steady wadi
#

Going

#

Done and error

elfin cove
#

interestingly i don't error...

#

ok i got it

#

just took a sec

steady wadi
#

ok, let me know once you have it to revert

elfin cove
#

yeah revert

#

ty

steady wadi
#

done! thanks

elfin cove
#

ok, it looks like this comes from the backend Pages project, there's a Function on this project which seems to throw that 500 due to being challenged on a subrequest

steady wadi
#

hmm ok

#

Do I have more information to debug? The challange work in my other AstroJS project

elfin cove
#

I'd recommend taking a look at the Function logs and see if that Worker throws the error into the log

#

?pages-logs

arctic sableBOT
steady wadi
#

Got it. I have some error log at least now

#

Looks like @astrojs-ssr-adapter

#

Weird. I will look further

#

ahhhhh

#

I know the problem 😂
I have an api.domain.com and seems that the Bot settings is also making that API a challange, then returning a non valid JSON making the whole app fail

elfin cove
#

haha yeah that'll do it, yeah this subrequest is being challenged

#

since ya know, workers are bots meowupsidedown

steady wadi
#

yeah

#

didn't think about this

#

the Bot settings apply to the whole domain

#

so subdomains too

elfin cove
#

Yeah, if you implement it as a rule instead of the toggle - that would let you add in an exclusion clause for it

steady wadi
#

Thanks for your help!