The Quant Rules Engine now supports geolocation in rulesets
2022 has shown that the world is an even more uncertain and dangerous place than last year, when we saw an incredible rise in cyber attacks and malicious behavior.
The new geo options in Quant Rules allow our users the ability to easily change traffic routing, serve custom content, or add additional security contexts to specific domains or routes.
These rules are easy to add and maintain through the Quant Dashboard.
Example use cases
Rules can be applied to domains or certain routes on projects, and allow for a country blocklist/allowlist to be applied. Some examples of what is possible:
- Serve static content when the traffic origin is Russia or Belarus, act as a caching reverse proxy otherwise
- Block all access to
/api/*when traffic does not originate from expected countries
- Redirect requests to the homepage when request is to WordPress admin and auth areas (e.g
/wp-admin/*) unless traffic originates in Australia
- Redirect requests to quantcdn.io when the request is to Drupal admin and auth areas (e.g
/admin/*) unless traffic originates in Canada
- Password protect files and content (e.g
/files/*) when the traffic originates in certain countries
- Return a HTTP status code 418 with custom markup when traffic originates from Russia
How do I configure geolocation rules?
Navigate to the "Rules" section of the Quant Dashboard and create or edit a rule.
In the "Rule" section, choose a country option (Any, Is, Is Not) and add the countries to allow or deny.
As usual, select an action (Redirect, Proxy, Password Protect, or Custom Response). Read the documentation for detail on each.
The rule may apply to all domains or specific ones attached to a project, and you have full control over which paths / routes the rule is enacted on.