All spotlights

Product spotlight · April 2025

Challenge bots and target requests more precisely with page rules

Since July 2024, page rules have gained a bot challenge action, traffic source and User-Agent matching, static content from the incoming path, and a new Terraform proxy rule schema.

Updated Page rules For developers

What changed from August 2024 to February 2025

The February 2025, November 2024, September 2024 and August 2024 changelogs have the full details.

  • Bot challenge action September 2024

    A Bot challenge action asks visitors to complete a challenge before content is served on the paths the rule matches. Choose a checkbox challenge or an invisible challenge that needs no interaction. You set the time to complete it, from 30 seconds to 5 minutes, and how long a passed challenge stays valid, from 1 minute to 24 hours.

  • Traffic source criteria September 2024

    Rules can match on where a request comes from, with "is one of" or "is not one of". The sources include Tor exit nodes, cloud computing services and VPN services. For example, you can apply stricter rules to traffic that does not come from ordinary visitors.

  • User-Agent matching August 2024

    A rule can apply when the request User-Agent header is one of a set of values, or when it is not one of them. Matches are case insensitive, and values can use the * wildcard.

  • Static content per path August 2024

    Serve static content rules accept the special value /$*. Each matched request then gets the static content at its own incoming path, not at one fixed path.

  • Proxy on 404 changes November 2024

    A proxy on 404 rule is a proxy rule with "Only on 404" selected. When Quant does not hold the exact URL of a request, this rule now sends the request straight to your origin. For example, a page URL with an added query string goes to your origin. Content filters now also apply to the HTML pages that the rule fetches.

  • Terraform proxy rule schema February 2025

    From provider version v0.0.5, you set to and host directly on the quant_rule_proxy resource, not in a nested proxy block. From v0.0.6, the failover settings also move out of the failover block. The failover_origin_ttfb setting fails over on origin time to first byte (TTFB), with a default of 2000 milliseconds.

By the numbers

max time to pass a challenge
5 minutes
max time a pass stays valid
24 hours
default TTFB failover limit
2000 ms

Action needed

  • Move the to, host and failover settings out of the nested proxy and failover blocks of quant_rule_proxy when you upgrade the provider to v0.0.5 or later.

Who it is for

  • Security teams

    Ask visitors who come from VPN services or Tor exit nodes to pass a bot challenge on the paths that you choose.

  • Proxy site owners

    Use a proxy on 404 rule to send URLs that Quant does not hold exactly to your origin, and filter their HTML.

  • Infrastructure teams

    Manage proxy rules as code with quant_rule_proxy, and fail over when your origin is slow to respond.

What it does

Page rules decide what happens to requests for your Quant project. A rule matches requests by URL pattern and by conditions such as domain, country, HTTP method, IP address or cookie. It then applies an action. Actions include redirects, proxies to your origin, custom headers, password protection, serving existing static content, and running edge functions or content filters.

This post covers the changes since the June 2024 spotlight on page rules, up to April 2025.

How it works

Challenge only the traffic you choose

The bot challenge action and the traffic source criteria work together. For example, create a rule with the Bot challenge action and a traffic source criterion of “is one of” VPN services. Visitors from those sources must pass the challenge before content is served on the matched paths. This rule does not challenge other visitors.

Serve static copies to crawlers

The page rules docs give one use for these changes: serve pregenerated static content to crawlers and bots, and proxy other requests to your origin. Match the crawler User-Agent values, with the * wildcard where you need it, and set the static content path to /$*. Each crawler request then gets the static copy at its own path.

Get started

  1. Create a page rule

    In the dashboard, create a rule and set the URL patterns it matches.

  2. Add a bot challenge

    Choose the Bot challenge action, then pick a checkbox or invisible challenge.

  3. Narrow the match

    Add a traffic source or User-Agent criterion to target only some requests.

  4. Keep the incoming path

    Set /$* as the path in a serve static content rule.

  5. Manage rules as code

    Follow the Terraform get started guide.

Related: Explore Page rules · Documentation · April 2025 changelog

Ready to try it on Quant?

Use page rules on your own project, or read the docs first.