Workers public IP address

Is there a way to get an IP address which when one sends a request to it will be handled by a Cloudflare Worker? Like I add this IP as an A DNS record to a domain and so the requests get served by the Cloudflare worker?
7 Replies
Unsmart
Unsmart2y ago
There 2 ways to setup workers: 1: Custom domains: https://developers.cloudflare.com/workers/platform/triggers/custom-domains/#custom-domains This will make your dns record a workers only origin. 2: Routes: https://developers.cloudflare.com/workers/platform/triggers/routes/ This you will setup your normal origin but can throw up a worker in front of that origin to intercept requests and make modifications to the request or even return a response bypassing the origin.
vassbence
vassbenceOP2y ago
These options do not give me a static IP address that I can point domains to what i'd like to achieve is to get an IP like 192.0.0.1 and if I for example make a request to it like GET https://192.0.0.1 then a worker replies because if I could get a setup like this then I could set this IP as an A record in any domain hosted anywhere and so that domain would get served by my worker Y'know when creating an EC2 instance you get a static IP, and I was wondering if CF has an offering where they give you an IP and route requests to a worker
Unsmart
Unsmart2y ago
That is not possible
vassbence
vassbenceOP2y ago
Hmm, then I'll have to set up a reverse proxy on my own which acts between the IP and a worker on a custom domain Could you elaborate please @flpydsk ? You can not set an URL as an A record for a domain
Bobby Donchev
Bobby Donchev2y ago
basically what you are saying is your application(s) do not work with DNS and can only handle IP addresses and thus you need a static IP for your worker?
vassbence
vassbenceOP2y ago
I want the users of my platform to be able to bring their own domain so if they have a domain like example.com I'd need to serve the website they created on my application on that domain for that they need to set an A record on the domain DNS to point to an IP where on that IP i serve their website
Want results from more Discord servers?
Add your server