Requests to none Cloudflare sites with path /cdn-cgi/ fail
A worker which requests content from another site can't access paths starting with
/cdn-cgi/
because Cloudflare handles these.
Is there any documentation for this problem and why does Cloudflare even handle these requests?
Example Worker
Expected output
Actual output
7 Replies
Cloudflare uses them for a ton of products and features
https://developers.cloudflare.com/fundamentals/reference/cdn-cgi-endpoint/
Cloudflare Docs
/cdn-cgi/ endpoint
When you add a domain to Cloudflare, Cloudflare adds a /cdn-cgi/ endpoint (www.example.com/cdn-cgi/) to that domain.
it's the main way custom assets hosted on CF for features like rocket loader/etc are loaded on your site (if not injected directly) and also used by a ton of features
But the website in question is not using Cloudflare and from my browser I geht the other response
Workers subrequests even to non-cf sites go out through the normal cdn layer
So there is no way to request a resource at a /cdn-cgi/ path?
And where is this documented?
the cdn-cgi path is documented above
if you mean the limitation of not being able to fetch specific paths, not sure if it is, it's simply a quirk of fetch implementation that basically outgoing fetch requests are treated as if myip.wtf is a cloudflare website/is proxied
Ok thanks for the help