We’re using Cloudlare’s DNS services to route traffic to a set of servers. I’m wondering if it’s possible to use Cloudflare workers to add a header to the web requests before it hits our servers. (We can’t use transform rules because the number of rules we need to apply would exceed what CF allows).
Based on how I understand what Cloudflare workers do, I suspect this is possible but would like to confirm this from experienced users.
If this is possible, can Cloudflare workers access a database to lookup values? I think the Cloudflare KV product allows for this but, again, looking to confirm.
So, the sequence of traffic events would be something like this:
incoming traffic → cfworker → lookup header in cf KV → add header to traffic → traffic hits target web server.
Thanks in advance for your comments and ideas!