边缘加速
  • 站点加速
    • 概述
    • 快速导入导出站点配置
    • 访问控制
      • Token 鉴权
      • 认证方法A
      • 认证方法B
      • 认证方法C
      • 认证方法D
      • 认证方法V
    • 智能加速
    • 文件优化
      • 智能压缩
    • 网络优化
      • HTTP/2
      • HTTP/3(QUIC)
        • 概述
        • 启用 HTTP/3
        • QUIC SDK
          • SDK 概览
          • SDK 下载和集成指引
          • 代码示例
            • Android
            • iOS
          • API 文档
            • Android
            • iOS
      • IPv6 访问
      • 最大上传大小
      • WebSocket
      • 携带客户端 IP 头部回源
      • 携带客户端 IP 地理位置头部回源
      • 开启 gRPC
    • URL 重写
      • 访问 URL 重定向
      • 回源 URL 重写
    • 修改头部
      • 修改 HTTP 节点响应头
      • 修改 HTTP 回源请求头
    • 自定义错误页面
    • 请求与响应行为
      • HTTP响应
      • 请求处理顺序
      • EdgeOne 默认 HTTP 回源请求头
      • EdgeOne 默认 HTTP 响应头
      • HTTP限制
    • 媒体服务
      • 音视频预拉取
      • 实时图片处理
      • 实时媒体处理
      • 点播媒体源
  • 四层代理
    • 概述
    • 新建四层代理实例
    • 修改四层代理实例配置
    • 停用/删除四层代理实例
    • 批量配置转发规则
    • 获取客户端真实IP
      • 通过 TOA 获取 TCP 协议客户端真实 IP
      • 通过 Proxy Protocol V1/V2 协议获取客户端真实 IP
        • 概述
        • 方式一:通过 Nginx 获取客户端真实 IP
        • 方式二:在业务服务器解析客户端真实 IP
        • Proxy Protocol V1/V2 获取的客户端真实 IP 格式
      • 通过 SPP 协议传递客户端真实 IP
  • 边缘 DNS
    • 概述
    • 托管域名 DNS 解析
      • 修改 DNS 服务器
      • 配置域名 DNS 解析记录
      • 批量导入DNS记录
      • DNS 高级配置
      • 解析线路与对应代码枚举
    • 接入加速域名
      • 添加加速域名
      • 站点/域名归属权验证
      • 修改 CNAME 解析
      • 验证业务访问
    • 别称域名
      • 概述
      • 配置指南
      • 通过别称域名批量接入 SaaS 建站域名
      • 别称域名实现业务的容灾
    • 流量调度
      • 流量调度管理
    • 源站配置
      • 回源配置
        • 回源超时
        • 配置回源 HTTPS
        • Host Header 重写
        • 回源请求参数设置
        • 回源跟随重定向
        • HTTP/2 回源
        • 分片回源
      • 负载均衡
        • 概述
        • 快速创建负载均衡实例
        • 健康检查策略介绍
        • 查看源站健康状态
        • 相关参考
          • 负载均衡相关概念
          • 请求重试策略介绍
      • 源站组操作指引
      • 相关参考
        • 旧版源站组兼容相关问题
  • 边缘缓存
    • 概述
    • EdgeOne 缓存规则介绍
      • EdgeOne 内容缓存规则
      • 缓存键(Cache Key)介绍
      • Vary 特性
    • 缓存配置
      • 自定义 Cache Key
      • 节点缓存 TTL
      • 状态码缓存 TTL
      • 浏览器缓存 TTL
      • 离线缓存
      • 缓存预刷新
    • 清除和预热缓存
      • 清除缓存
      • 预热缓存
    • 如何提高 EdgeOne 的缓存命中率
  • 规则引擎
    • 概述
    • 规则引擎支持的匹配类型与操作
    • 规则管理
    • 变量
当前内容仅提供英语版本,中文版我们将尽快补充,感谢您的理解。

规则引擎支持的匹配类型与操作

Supported Matching Types

Supported matching types are listed in the following tables.
Note
1. URL Path and URL Full support wildcard match. If the URL Path is /foo/*/bar, both /foo/example/barand /foo/demo/bar are valid values.
2. URL Path, URL Full, query string, file extension,file name and HTTP request header support enabling ignoring case (it is disabled by default).
3. After selecting response characteristics (HTTP response header, HTTP status code) as match conditions, you cannot use AND or OR with any other request characteristic match conditions.
4. Response characteristics (HTTP response header, HTTP status code) matching must be in the innermost layer. For example, if you have configured 2 layers of IF, the response characteristics must be in the nested IF.
Type
Description
Sample values
HOST
Request Host
www.example.com
URL Path
Request URL path
If you need to match the /example/foo/bar path, then select the operator Equal to and enter the value /example/foo/bar.
If you need to match the /example directory and all files under the directory, then select the operator Equal to and enter the value /example/*.
URL Full
Full request URL, including the protocol, domain name, URL path, and query string.
If you need to fully match the https://www.example.com/foo.jpg path, then select the operator Equal to and enter the value https://www.example.com/foo.jpg.
If you need to match a path consisting of https://www.example.com/foo.jpg and a query string, then select the operator Regular expression matching and enter the value https://www.example.com/foo\.jpg($|\?) .
If you need to match a path consisting of https://www.example.com/foo.jpg and the query string test, then select the operator Regular expression matching and enter the value https://www.example.com/foo\.jpg($|\?.*test=) .
Query string
Query string in the request URL
Parameter name: key
Parameter value: value
File extension
File extension (file extension) of the request content
jpg, png, css
File name
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 geo location
Country/region of the client IP
United States
Request protocol
Requested protocol type by the client
HTTPS or HTTP
Client IP address
Client IP of the request
You can enter an IP address or IP address range.For example:
IPv4: 192.168.0.0 or 192.168.0.0/24, where 0.0.0.0/0 matches all IPv4 addresses.
IPv6: 2001:db8:1234::1 or 2001:db8::/32, where ::/0 matches all IPv6 addresses.
Request Method
Client request method
The supported methods are as follows, multi-option.
GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT, OPTIONS, PATCH, COPY, LOCK, MKCOL, MOVE, PROPFIND, PROPPATCH, UNLOCK.
Cookie
Cookie request header
Parameter name:key
Parameter value:value
HTTP response header
HTTP response header
HTTP response header name: name
HTTP response header value: value
HTTP response status code
HTTP response status code
Supports drop-down box selection and custom input status code.
All
Any site request
N/A

Operators

Type
Description
Is in
The request is equal to a specified value (value of the matching type).
Is not in
The request is not equal to a specified value (value of the matching type).
Exist
A specified value exists in the request (HTTP header name or query parameter name).
Does not exist
A specified value does not exist in the request (HTTP header name or query parameter name).
Matches regex
URL Path、URL Full、Query string、File extension、File name、HTTP request header、HTTP response header、Request Method and Cookie support Google RE2 regular expression matching.
Does not mach regex
URL Path、URL Full、Query string、File extension、File name、HTTP request header、HTTP response header、Request Method and Cookie support Google RE2 regular expression not matching.

Supported Actions

Actions refer to a series of feature configurations performed after the requests hit the conditions. The supported actions and matching types are listed in the following tables.

Cache configuration

Action
Description
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
Query string
File name
File extension
HTTP Request Header
Client geo location
Request protocol
Client IP
Cookie
All
By adjusting the cache period of resources in browsers, you can optimize the browser cache and increase the loading speed of the requested resources.
HOST
URL FULL
URL Path
File name
File extension
Query string
Client geo location
Client IP
Request method
Cookie
HTTP response header
HTTP response status code
All
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
File name
File extension
Query string
HTTP Request Header
Client geo location
Client IP
Cookie
All
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
File name
File extension
Query string
Cookie
All
Cached resources are validated via origin-pull before expiration, so that your site can respond to requests more rapidly.
HOST
URL FULL
URL Path
File name
File extension
Cookie
All
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
File name
File extension
Query string
HTTP Request Header
Client geo location
Client IP
Cookie
All

Network optimization

Action
Description
Supported Matching Types
HTTP/2 (HTTP 2.0) requests are supported to accelerate sites and improve the web performance.
HOST
All
HTTP/3 (QUIC) requests are supported. HTTP/3 (QUIC) is used to accelerate site requests and improve data transfer efficiency and security.
HOST
All
EdgeOne supports the WebSocket protocol that allows the server to proactively send data to the client.
HOST
Request method
Cookie
All
The maximum upload size is the maximum data volume that can be uploaded in a single client request. You can restrict it to improve the data transfer efficiency and optimize the network transfer.
HOST
URL FULL
URL Path
File name
File extension
Query string
HTTP Request Header
Request method
Cookie
All
Smart Compression can automatically compress the resources to Gzip/Brotli files to reduce the files size and shorten the resource loading time.
HOST
Request method
All
Smart acceleration refers to smart dynamic routing acceleration. After this feature is enabled, it will detect the node network latency in real time and use the smart algorithm to select the optimal transfer path, so as to handle both static and dynamic client requests more quickly, stably, and securely. Smart dynamic routing minimizes problems such as high network latency, connection errors, and request failures.
HOST
All
Request origin-pull over the HTTP/2 protocol is supported.
HOST
Request method
Cookie
All
You can reasonably set the origin-pull request timeout based on the network link conditions and the data processing capability of the origin server to ensure normal origin-pull as requested. The origin-pull timeout is defined as follows. If there is no data response from the origin server after a node initiates an origin-pull request, no matter how long the duration is, the node considers it a timeout and actively disconnects from the origin server.
HOST
All

HTTPS optimization

Action
Description
Supported Matching Types
You can use 301 or 302 redirect to redirect HTTP client requests to HTTPS requests and send them to EdgeOne.
HOST
All
Force clients such as browsers to establish connections to edge nodes over HTTPS for global website encryption.
HOST
All
Configure the protocol version and Cipher suite that are allowed to use when the client shakes hands with the edge server TLS as needed.
HOST
All
Pre-cached OCSP responses are sent at the time of TLS handshake to improve the efficiency.
HOST
All
You can specify the protocol that EdgeOne uses in the origin-pull request.
HOST
All

Modifying HTTP header

Action
Description
Supported Matching Types
You can customize, add, and delete headers in HTTP responses from nodes to clients.
HOST
URL FULL
URL Path
File name
File extension
Query string
Client geo location
Client IP
Request method
HTTP response header
HTTP response status code
Cookie
All

The custom header can carry the real client IP to the origin.
HOST
URL FULL
URL Path
File name
File extension
Query string
HTTP Request Header
Client geo location
Client IP
Request method
Cookie
All
The custom header can carry the geographical location information of the client IP to the origin.
HOST
Client geo location
Client IP
Request method
Cookie
All
You can customize, add, and delete headers in HTTP origin-pull requests from nodes to the origin.
HOST
URL FULL
URL Path
File name
File extension
Query string
HTTP Request Header
Client geo location
Client IP
Request method
Cookie
All
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 geo location
Client IP
Request protocol
Request method
Cookie
All

Advanced configuration

Action
Description
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
File name
File extension
Query string
HTTP Request Header
Client geo location
Client IP
Request method
Cookie
All
As an access control policy, token authentication supports creating rules to validate access and filter out unauthorized access requests. This effectively prevents your site resources from being maliciously hotlinked and thus protects your business.
HOST
URL FULL
URL Path
File name
File extension
Query string
HTTP Request Header
Request method
Cookie
All
Modify Origin
Configuration of primary and secondary sources, separate Path, and separate region Rules for complex origin-pull strategies.
HOST
URL Path
Client geo location
Client IP
HTTP Request Header
Query string
File extension
Request protocol
Request method
Cookie
All
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
File name
File extension
Query string
HTTP Request Header
Client geo location
Client IP
Request method
You can specify which part of the query string and Cookie to be included in the request when it’s forwarded to the origin.
HOST
URL FULL
URL Path
File name
File extension
Query string
HTTP Request Header
Client geo location
Client IP
Request method
Cookie
All
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
File name
File extension
Query string
HTTP Request Header
Client geo location
Client IP
Request method
Cookie
All
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
File name
File extension
Query string
HTTP Request Header
Client geo location
Client IP
Request method
Cookie
All
Range GETs can be enabled to reduce the consumption of large file origin-pulls and response time.
HOST
URL FULL
URL Path
File name
File extension
Query string
HTTP Request Header
Request method
Cookie
All
The HTTP response feature is supported by the rule engine. When the corresponding conditions are met, the EdgeOne node directly responds with the specified status codes and page content.
HOST
URL FULL
URL Path
File name
File extension
Query string
HTTP Request Header
Client geo location
Request protocol
Client IP
Request method
HTTP response header
HTTP response status code
Cookie
All (any site request)
Vary
When clients make requests to the origin server using the same URL, if the origin server has different versions of file content, they may be cached by intermediate caching systems (such as browser cache, Content Delivery Network CDN), making it impossible to distinguish between scenario response files. Therefore, the origin server can add the Vary header in the HTTP response to inform intermediate caching systems which request header to use to differentiate cached version content.

HOST
URL FULL
URL Path
File name
File extension
Query string
Client geo location
Request protocol
Client IP
Request method
Cookie
All
Game version releases, software downloads and other sudden business scenarios can easily generate high bandwidth and costs. The Speed limit for single connection download provided by EdgeOne can implement downlink rate limiting for requests between nodes and clients, which can control bandwidth peaks of acceleration domain names to some extent, but may also affect users' file download experience. Therefore, it's necessary to set reasonable speed limit values based on business characteristics.
HOST
URL FULL
URL Path
File name
File extension
Query string
Client geo location
Request protocol
Client IP
Request method
Cookie
All