PwnageEverywhere
PwnageEverywhere
CDCloudflare Developers
Created by PwnageEverywhere on 11/11/2024 in #general-help
Origin Rules for reverse proxy
I’m setting up a reverse proxy using Cloudflare origin rules and could use some help troubleshooting. The goal is to have two rules in place: 1. Primary Rule: Requests to app.example.com/api/endpoint* (including any query strings) should route to app.otherdomain.com/api/endpoint, passing along any query string parameters. 2. Fallback Rule: Requests that do not match the URI patterns described in the primary rule should route to app2.otherdomain.com/whatever. I’ve set up the primary rule, and it appears to work on its own, correctly matching and routing requests to the intended origin. However, when I add the fallback rule (configured with a custom “place at” to execute after the primary rule), the routing stops working as expected. Instead of acting as a catch-all, the fallback rule seems to interfere with the first rule. Is there something I might be missing in the rule setup or ordering that could be causing this conflict? Any insights would be appreciated!
2 replies