the issue is that custom error responses don't actually know if there was a 1101, 1102, etc.

the issue is that custom error responses don't actually know if there was a 1101, 1102, etc.
10 Replies
Chaika
Chaika3y ago
lol yea, or you could just not unoverride them at all, but you can't tell eitherway with that not working
dave
daveOP3y ago
::CLOUDFLARE_ERROR_1000S_BOX::
::CLOUDFLARE_ERROR_1000S_BOX::
Sadly doesn't work either with custom error responses (it's not documented to work, so it was a wild guess). Is there a IP range that Workers tend to stick to? eh never mind, don't think that's gonna help at all. The A records of my main domain and subdomain both match the cf.edge.server_ip address I guess I could filter for text/html; charset=UTF-8 too if I'm 100% sure my Worker never returns that. though... none of this really gets to the core, which is actually getting the real 1xxx error code somehow
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
dave
daveOP3y ago
How so? (Bout to give up and do a hacky workaround.) I can't use Transform Rules on .workers.dev I assume? (I tried with no luck)
Erisa
Erisa3y ago
correct, you cant use transform rules on a workers.dev
dave
daveOP3y ago
thanks!
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
dave
daveOP3y ago
@chaika.me got any creative idea on how I could peek into the body of cf.response / http.response with the rule engine?
kian
kian3y ago
body access is a Enterprise thing nvm that's request body there is no response body access in the ruleset engine afaik
Chaika
Chaika3y ago
When you input http.response.body.raw in the a rule it says cannot use field http.response.body.raw, not available to this plan/phase and not just unknown identifier, so I guess it exists but is prob locked behind the same Ent thing

Did you find this page helpful?