Ollie.
CDCloudflare Developers
•Created by Ollie. on 5/20/2024 in #general-help
Cloudflare LoadBalancer Force request to specific Origin
Hey! Im trying to configure the Cloudflare load balancer so if I set a specific header it will force the request to a specific origin / origin pool (either is fine). However I have run into a small problem, the method I was using (creating a load balancer rule) limits you to 1 rule per load balancer unless your on Enterprise... and I ain't paying that lol.
Does anyone know a different method of achieving this? it doesn't have to be pretty as it will be solely used for API requests
7 replies
CDCloudflare Developers
•Created by Ollie. on 10/24/2023 in #general-help
CloudFlare LoadBalancer: force request to a specific origin
Hey I am using the CloudFlare load balancer for a NextJS project using On-Demand Cache revalidation which uses an API route to revalidate cache for a specific route or tag, is there anyway I can force the load balancer to send the API request to a specific origin?
I guess I could probably create a rule that checks if the the request has a specifc header and if so route the request to a specific orign. However as this is a SaaS project having a large amount of Load Balancer rules might become expensive so I'm hoping there is a better alternative.
1 replies