Supported Matching Types and Actions

Last updated: 2023-09-07 15:38:56

Supported Matching Types

The following table elucidates the various matching types supported by the rule engine:
Note:
1. Both URL Path and URL Full support wildcard matching. For instance, if the value of URL Path is /foo/*/bar, then both /foo/example/bar and /foo/demo/bar will trigger this rule.
2. URL Path, URL Full, query string, file suffix, file name, and HTTP request header all support the enabling of case insensitivity (by default, this feature is disabled, meaning uppercase and lowercase are considered distinct values).
Local Disk Types
Note
Value (Example)
HOST
Host of the Request
www.example.com
URL Path
Request URL Path
/example/foo/bar
URL Full
Complete Request URL Content
https://www.example.com/foo
Query String
Query string in the request URL
Parameter name: key
Parameter value: value
File extension
File extension of the requested content
jpg、png、css
Object
The file name of the request content
foo.txt
HTTP request header
HTTP Request Header
HTTP request header name: name
HTTP request header value: value
Client Country/Region
Country/Region of the client IP
United States
All
Any request to the site
N/A

Operator

Local Disk Types
Note
Equal to
The request equals any specified value (corresponding to the value of the matching type).
Not equal to
The request does not equal any specified value (corresponding to the value of the matching type).
Exists
Any specified value appearing in the request (either in the name of the HTTP request header or in the name of the query parameter)
Does not exist
Any specified value does not appear in the request (either in the name of the HTTP request header or in the name of the query parameter).
Match by regex
URL Path and URL Full support Google RE2 regular expression matching.

Supported actions

An operation refers to a series of functional configurations within the rule engine that are executed after a request matches a rule. The following table outlines the operations and matching types supported within the rule engine:

Cache Configuration

Action
Note
Supported Matching Types
By configuring the cache TTL, you can optimize node cache to improve resource loading and update resources in a timely manner.
HOST
URL FULL
URL Path
Object
File extension
Adjust the span for resources caching in the browser to optimize the browser cache and accelerate the loading of requested resources.
HOST
URL FULL
URL Path
Object
File extension
Query String
Client Country/Region
A cache key can be customized to suit your needs by setting the query string, HTTP header and URL case, so that requested resources can be loaded faster.
HOST
URL FULL
URL Path
Object
File extension
Query String
HTTP Request Header
Client Country/Region
You can specify a TTL period for origin response status codes, allowing the node to directly respond with non-2XX codes.
HOST
URL FULL
URL Path
Object
File extension
Query String
Cached resources are validated via origin-pull before expiration, so that your site can respond to requests more rapidly.
HOST
URL FULL
URL Path
Object
File extension
Client Country/Region
After offline caching is enabled, when your origin fails, and resources cannot be pulled through origin-pull normally, resources cached on nodes (even expired resources) can be used until the origin recovers.
HOST
URL FULL
URL Path
Object
File extension
Query String
HTTP Request Header
Client Country/Region

Network Optimization

Action
Note
Supported Matching Types
HTTP/2 (HTTP 2.0) requests are supported to accelerate sites and improve the web performance.
HOST
HTTP/3 (QUIC) requests are supported. HTTP/3 (QUIC) is used to accelerate site requests and improve data transfer efficiency and security.
HOST
EdgeOne supports the WebSocket protocol that allows the server to proactively send data to the client.
HOST
The maximum upload size refers to the largest volume of data that can be uploaded in a single client request. By imposing a limit on the maximum upload size, data transfer rates can be enhanced to a certain extent, thereby optimizing network transmission.
HOST
URL FULL
URL Path
Object
File extension
Query String
HTTP Request Header
Smart Compression can automatically compress the resources to Gzip/Brotli files to reduce the files size and shorten the resource loading time.
HOST
Smart acceleration, also known as dynamic intelligent routing acceleration, is a feature that, once enabled, allows us to monitor network latency in real time. By utilizing intelligent algorithms, we can select the most efficient transmission path, thereby processing client requests in a faster, more stable, and more secure manner, regardless of whether the requests are for static or dynamic resources. Through the use of intelligent dynamic routing, we can significantly reduce issues such as network latency, connection errors, and failed requests.
HOST
Request origin-pull over the HTTP/2 protocol is supported.
HOST

HTTPS

Action
Note
Supported Matching Types
You can use 301 or 302 redirect to redirect HTTP client requests to HTTPS requests and send them to EdgeOne.
HOST
Compel clients, such as browsers, to establish connections with edge nodes via HTTPS, thereby globally encrypting the website.
HOST
Configure the protocol version and cipher suite permitted for use during the TLS handshake between the client and the edge server, as required.
HOST
Send pre-cached OCSP responses during TLS handshake to improve handshake efficiency.
HOST
Specify the protocol that EdgeOne employs when making an origin-pull request.
HOST

HTTP header modification

Action
Note
Supported Matching Types
You have the ability to customize, augment, or eliminate HTTP response headers (these are the HTTP response headers from nodes when responding to client users).
HOST
URL FULL
URL Path
Object
File extension
Query String
Customize the header of the real client IP to be passed to the origin server.
HOST
URL FULL
URL Path
Object
File extension
Query String
HTTP Request Header
Client Country/Region
The custom header can carry the geographical location information of the client IP to the origin.
HOST
Client Country/Region
You can customize, add, or delete HTTP request headers when nodes request origin-pull from the source station.
HOST
URL FULL
URL Path
Object
File extension
Query String
HTTP Request Header
Client Country/Region
Host header rewriting enables you to rewrite the host header to the actual origin domain when the origin domain is different from the acceleration domain in the load balancing task.
HOST URL FULL URL Path File Name File Extension Query String HTTP Request Header Client Country/Region

Advanced Configurations

Action
Note
Supported Matching Types
A node redirects the URL requested by the client to the destination URL based on the response status code.
HOST
URL FULL
URL Path
Object
File extension
Query String
HTTP Request Header
Client Country/Region
An access control strategy that validates access and filters out illicit requests through the configuration of authentication rules. This strategy effectively safeguards your site resources from malicious exploitation, thereby protecting your business content.
HOST
URL FULL
URL Path
Object
File extension
Query String
HTTP Request Header
Modify origin
Configure primary and secondary sources, path-specific, and regional strategies for complex origin retrieval.
HOST + Any of the following matching types
URL Path
Client Country/Region
HTTP Request Header
Query String
File extension
Based on specified rules, this feature rewrites the user request URL received by the node to the destination URL when the node sends the request to the origin server, which doesn't affect the node cache key.
HOST
URL FULL
URL Path
Object
File extension
Query String
HTTP Request Header
Client Country/Region
Customize whether the original query string and Cookie from the request are included during the origin-pull request. By default, all original query strings and Cookies from the request are retained during the origin-pull.
HOST
URL FULL
URL Path
Object
File extension
Query String
HTTP Request Header
When origin-pull is requested, the redirect will be based on the 302/301 status code of the origin server, and you can specify the maximum number of redirects (which is 3 by default and can be 1–5).
HOST
URL FULL
URL Path
Object
File extension
Query String
HTTP Request Header
You can redirect requests to a custom error page for specific error status codes returned by the origin. The redirection is performed when a 302 is returned.
HOST
URL FULL
URL Path
Object
File extension
Query String
HTTP Request Header
Range GETs can be enabled to reduce the consumption of large file origin-pulls and response time.
HOST
URL FULL
URL Path
Object
File extension
Query String
HTTP Request Header