sure so I can setup a cron job to hit the r2 to cache worker responses. I'd then be hitting R2 first always to see if the response is cached there and if not/"stale hit" then hit the worker, and just in case the worker comes back with an rate limiting error I can just use what I got from R2.
hey guys, i have a cloudflare worker that does only redirections. for example mydomain.com/path1 then it searches the KVs value for /path1 and redirects to that URL. But i noticed that i get less visitors on my domain after that. do you maybe know what the issue could be?
the domain gets really low number of requests with the worker. its about 50 requests daily now, before it was about 200 hundred i even removed the worker and got more requests directly the enxt day
Please do not post your question in multiple channels per the rules at #welcome-and-rules. It creates confusion for people trying to help you and doesn't get your issue or question solved any faster.
Hey, when I want to create a worker it always includes my email address in a subdomain like this: name.mail.workers.dev, is there a way to create a worker without having it include my email?
Workers aren't based on node.js, they're based on V8 - the JS Engine Chrome and Node.js uses. There is some node compat they've added back in: https://developers.cloudflare.com/workers/runtime-apis/nodejs/ but fundamentally they're never going to have a file system, and currently no node networking support (although I think they were working on that, at least as of the moment it'd be only tcp outgoing, not tcp incoming, or udp in/out), not possible to have generic web servers like express and such, and workers are under pretty strict limitations of needing to startup within 500ms at most, max 128mb of memory and max size of 10 mb on paid
Is anyone aware of a mechanism for "CNAME flattening" to be done by other domain providers in a way that is compatible with workers?
I.e. if you want to host a worker at myroute.com, you have to define a "CNAME" for myroute.com. That's not wise (all subdomains / records get borked)... so Cloudflare has a mechanism called "CNAME flattening" that reconciles this problem by turning the "CNAME" at the root into A records on demand.
However, Workers require "recognizing" this domain as being CNAME'd to the worker route in question. They recognize Cloudflare "CNAME flattening," but not similar mechanisms by other providers (i.e. Namecheap provides ALIAS records that do much the same).
Is anyone aware of a way to get this to work? i.e. host a domain on Namecheap and CNAME the root to Cloudflare workers in a way that makes Cloudflare workers happy? (They just see an A record).
Right, CF For SaaS enables that. You can't get apex proxying outside of Enterprise so you need to rely on alias records, but it should just work if you go through the prevalidation and such