cli icon indicating copy to clipboard operation
cli copied to clipboard

Redirect by country using subdivision names

Open slumbering opened this issue 3 years ago • 2 comments

Which problem is this feature request solving?

I don't know if it's possible but this feature would give more granularity in the way we manage access by countries.

This would work for US Embargoes sanctions (CRIMEA - REGION OF UKRAINE, CUBA, IRAN, NORTH KOREA, and SYRIA) for instance.

Right now netlify accept only ISO 3166-1 alpha-2. https://docs.netlify.com/routing/redirects/redirect-options/#redirect-by-country-or-language

Describe the solution you'd like

Using this kind of contition would help a lot :

[[redirects]]
  # Embargoes compliance.
 conditions = {Country = ["CU", "IR", "KP", "SY", "**UA-43**"]}
  from = "/*"
  to = "/restricted"
  status = 302
  force = true

With the code UA-43 the restriction would be apply only to the Crimea and not the whole Ukraine.

Pull request (optional)

  • [ ] I can submit a pull request.

slumbering avatar Mar 31 '22 20:03 slumbering

Hi @slumbering and thanks for open the feature request. Mind adding it to https://answers.netlify.com/t/feature-requests-what-do-you-already-love-what-could-be-better/256 as well? This will require our platform to support it too

erezrokah avatar Apr 01 '22 10:04 erezrokah

Thanks @erezrokah :)

slumbering avatar Apr 01 '22 13:04 slumbering