Samy
Samy
CDCloudflare Developers
Created by Samy on 11/19/2023 in #general-help
Using Cloudflare for SaaS with multiple workers as fallback origins
I'm exploring how to do support the following with Cloudflare For Platforms (SSL For SaaS): Best case: the user can configure a CNAME a.example.com or b.example.com for their custom hostname; depending on the CNAME, a different worker is being used as the fallback origin (or we can have a condition in the worker) Otherwise: we can edit the custom origin server for the custom hostname on our side (manually in the Cloudflare dashboard or using the API) and based on this value, the requests are handled by different workers as fallback origins. But I'm unsure how to make any of these work. I don't see how to make "custom origin server" change anything to the route used by the worker (it might be related to https://github.com/cloudflare/cloudflare-docs/issues/5584). In all cases we need a worker with the route */* and the value of the "custom origin server" has no impact. For the "Best case", I can't find any way to leverage the CNAME value somewhere in the pipe. Help is more than welcomed 🙌
1 replies