Finer granularities are supported, so you can use conditional statements to flexibly create custom configurations.
|Rule||You can create multiple rules under a single site, and a single rule can contain multiple IF statements.|
|IF||Conditional expression, which is followed by a match condition.|
|Match condition||It identifies/matches a request and is in the format of
|And||Logical AND, which can connect different match conditions, such as
Log in to the EdgeOne console and click Rule engine on the left sidebar.
Currently, the EdgeOne console is available for only selected users. To access it, contact us to get the permission.
On the rule engine page, select the target site. The following content is supported:
|Create a rule||Click to create a rule.|
|Save and publish||Save the currently edited rule and release it to the production network for it to take effect.|
|Save only||Save the currently edited rule without releasing it to the production network.|
|Sort||Multiple IF statements in a single rule can be sorted in a custom way.
Multiple rules under a single site can be sorted in a custom way. Click and drag and drop items to adjust the order.
|Rule status||Status icon after each rule:
|Search||You can search for rules by keyword.|
- Only the
=operator is supported currently.
- Different match conditions can be connected with only logical AND (
|All (any request)||All requests under the current site.
Note: We recommend you use this match condition to create a global rule as the baseline rule.
|Host||Subdomain under the current site, such as
|URL Path||Request URL path under the current site, such as
Supported operations are subject to the match condition. For example, if the match condition is URL path, some operations are unavailable (as they don't support the URL granularity).
|Access authentication||Token Authentication
Requests are authenticated according to the specified signing method.
|URL rewrite||Access URL Rewrite
The access URL rewrite feature rewrites the access URL in the request actually initiated by the client to the target URL, i.e., URL of the cached resource on the node.
|Origin-pull URL Rewrite
The origin-pull URL rewrite feature rewrites the URL in the origin-pull request initiated by a node to an origin server to the target URL, which doesn't affect the node cache key.
|Cache configuration||Query string|
|Edge node cache TTL|
|Browser cache TTL|
|Origin-pull configuration||HTTP/2 origin-pull
Request origin-pull over the HTTP/2 protocol is supported.
|Header modification||HTTP request header modification
You can customize, add, and delete headers in HTTP origin-pull requests from nodes to the origin server.
|HTTP response header modification
You can customize, add, and delete headers in HTTP responses from nodes to clients, which will not affect the node cache.
|Advanced configuration||Custom error page
If an error status code is specified for origin server response, status code 302 will be returned, and the custom page will be redirected to.
You can configure the following content to create rules with a finer granularity for the current site
example.com, customize the cache policies for two subdomains
blog.example.com, and add an HTTP request header to indicate that origin-pull is requested from an EdgeOne node:
IF Host = www.example.com THEN Node cache TTL: Custom time - 10 days Browser cache TTL: Custom time - 10 days HTTP request header modification: Add `CDN = EdgeOne`
IF Host = blog.example.com THEN Dynamic acceleration: Off Node cache TTL: Custom time - 30 days Browser cache TTL: Custom time - 30 days HTTP request header modification: Add `CDN = EdgeOne`