Cloudflare routes configuration in wrangler.toml

Is there a way to match route patterns and forward traffic on /groups/:groupId/users/:userId to one worker and /groups, /groups/:groupId to a different worker by configuring the wrangler.toml?
1 Reply
Suman!
Suman!OP5w ago
For eg: this does not work -
[env.dev]
routes = [
{ pattern = "dev-api.kazeel.com/v1/groups/*/users/*", custom_domain = false },
]
[env.dev]
routes = [
{ pattern = "dev-api.kazeel.com/v1/groups/*/users/*", custom_domain = false },
]
Is there a way to achieve this? via any other features that cloduflare offers? Rewrites/ snnipets etc.. @Leo I got it working with cloudflare transform rules. Thanks
Want results from more Discord servers?
Add your server