tencent cloud

Feedback

Configuration Guide

Last updated: 2022-05-18 16:15:29

    Overview

    Finer granularities are supported, so you can use conditional statements to flexibly create custom configurations.

    Definitions

    Item Description
    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 match type + operator + value such as URL path = /example/foo.jpg.
    And Logical AND, which can connect different match conditions, such as Host = www.example.com And URL path = /example/foo.
    Operation
  • Specific operation to be executed by a request that is matched to a condition. It must follow a match condition.
  • A match condition must have an operation.
  • Execution sequence
  • Multiple IF statements in a single rule will be executed from top to bottom in sequence.
  • Multiple rules under a site will be executed starting from number one from top to bottom in sequence.
  • Note: If an IF statement contains multiple operations, and some of them are authentication operations, authentication operations will be always executed first (top priority) without being subject to the sequence.

    Directions

    1. Log in to the EdgeOne console and click Rule engine on the left sidebar.

      Note:

      Currently, the EdgeOne console is available for only selected users. To access it, contact us to get the permission.

    2. On the rule engine page, select the target site. The following content is supported:

    Supported actions

    Action Description
    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:
  • Enabled: It has been released to the production network and taken effect.
  • Disabled: It hasn't been released to the production network, and only the rule content is saved.
  • Search You can search for rules by keyword.

    Supported match conditions

    Note:

    • Only the = operator is supported currently.
    • Different match conditions can be connected with only logical AND (And).
    Match Condition
    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 www.example.com, foo.example.com, and foo.bar.example.com.
    URL Path Request URL path under the current site, such as /example/foo.jpg and /example/foo/bar.

    Supported operations

    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).

    Operation Description
    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.
    Network optimization QUIC
    Cache configuration Query string
    Edge node cache TTL
    Browser cache TTL
    Offline caching
    Case ignoring
    Smart acceleration
    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.

    Configuration Samples

    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 www.example.com and blog.example.com, and add an HTTP request header to indicate that origin-pull is requested from an EdgeOne node:

    www.example.com rule

    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`
    

    blog.example.com rule

    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`
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support