What changed in April 2024
The April 2024 changelog has the full details.
Three new rule actions
Serve existing static content returns content that you already published at another path, such as
/about-us. Execute serverless function runs one of your edge functions. Execute content filter applies one of your content filters to the response that is served. That response can be a static page, the output of an edge function or an HTML response from a rule that runs later.IPv6 in IP rules
IP match rules now accept IPv6 addresses alongside IPv4 addresses, as individual addresses or CIDR ranges. The edge matches them against the IPv6 addresses of visitors.
Query strings are kept
Redirect and proxy rules now keep the request's query string. To match on a specific query string, include it in the URL pattern, for example
/search?q=*. The original query string is then not added to the destination again.Full path capture
Proxy and redirect destinations now accept
$*, which is replaced with the full matched request path. The existing$1to$5patterns still insert individual wildcard matches.
Also from March 2024
The March 2024 changelog has the full details.
Wildcards and multiple URLs
A single rule can now match multiple URLs, and a URL pattern can begin with a wildcard, for example
*.pdf. Before this change, each rule accepted one URL pattern that had to start with a slash.Strip request headers
Proxy rules have a Strip request headers option that removes the headers you list before Quant sends the request to your origin. Request headers that a proxy rule injects now replace an existing header with the same name instead of adding a second value.
Who it is for
Site developers
Run an edge function or a content filter for the URLs you choose, or serve published content again at a second path.
Teams moving sites
Keep query strings and full request paths when you redirect or proxy old URLs to a new site or to your origin.
Teams that filter by IP
Match visitors by IPv6 address or CIDR range in the same IP rules that you already use for IPv4 addresses.
How it works
A page rule matches requests and then applies an action. In April 2024, page rules gained three actions that connect rules to your static content and your edge code. You can combine them with the existing rule conditions: domain, URL, country, HTTP method, IP address and cookie.
Serve existing static content returns content that you already published at another path. For example, a rule can return the content of /about-us for matching requests.
Execute serverless function runs one of your edge functions for matching requests. Execute content filter applies one of your content filters. A content filter changes the response before it reaches visitors, for example to rewrite page markup as it is served. You create and edit content filters in the dashboard code editor, where new filters start with example code that you can adapt.
Redirect and proxy rules now keep the query string of the request:
Rule: redirect /old-page to /new-page
Request: /old-page?ref=footer
Result: /new-page?ref=footerThe new $* capture helps when one rule matches several URL patterns, such as /blogs/* and /posts/*. Each request keeps its own path at the destination.
Since March 2024, one rule can match several URLs, so you can group related paths in one rule.
Get started
Create a page rule
In the dashboard, create a rule and set the URL patterns it matches.
Choose an action
Pick a new action, such as Execute serverless function or Execute content filter.
Add conditions
Limit the rule by domain, country, HTTP method, IP address or cookie.
Keep the full path
Use
$*in a redirect or proxy destination to keep the matched path.Read the docs
See Page Rules: Actions for each action.
Related: Explore Page rules · Documentation · April 2024 changelog
Ready to try it on Quant?
Use page rules on your own project, or read the docs first.