StackExchange / dnscontrol

Infrastructure as code for DNS!
https://dnscontrol.org/
MIT License
3.14k stars 399 forks source link

Cloudflare - Bulk Redirects #3166

Open wdhdev opened 3 weeks ago

wdhdev commented 3 weeks ago

Is your feature request related to a problem? Please describe. Currently DNSControl supports both page rules and redirect rules, however it would be good if they supported bulk redirects as well.

This would be very useful as I have 700+ redirects and it is not possible to use page or redirect rules, even though we are on Cloudflare's enterprise plan with a limit of 125 rules respectively.

Describe the solution you'd like A method of adding bulk redirects on Cloudflare.

Something like:

CF_BULK_REDIRECT("LIST_NAME", "SOURCE_URL", "REDIRECT_RULE", "STATUS_CODE", { /* PARAMETERS */ });

Parameter options: image

Describe alternatives you've considered Page rules and redirect rules, however both are not feasible due to the amount of redirects we have.

tlimoncelli commented 3 weeks ago

CC @tresni

Sounds like a useful feature. I don't have room to implement it, but I'd be glad to mentor anyone interested in making this happen. The code for CF_SINGLE_REDIRECT is a good template for what you need to do.