All Products
Search
Document Center

Edge Security Acceleration:Configure custom rules

Last Updated:May 23, 2025

You can implement custom rules to accommodate specific user requirements or application scenarios.

Create a custom rule

  1. In the ESA console, choose Websites and click the name of the website you want to manage.

  2. In the left-side navigation pane, choose Traffic > Load Balancing. Click Create to create a load balancer, or click Edit in the Actions column of your load balancer.

    image

  3. While creating or editing a load balancer, click Create Custom Rule in the Configure Custom Rule tab.

    image

  4. Enter a Rule Name and select or edit properties in the If requests match... tab.

    Note
    • The expression builder offers a variety of common request attributes. Select the appropriate request matching rules and generate expressions tailored to your needs. For more information, see Work with rules.

    • An accelerated domain name can redirect to different origins based on the URI path.

    • You can select a match type from the match type drop-down list. For more information, see Match fields.

    • You can select an operator from the operator drop-down list. For more information, see Match operators.

    image

  5. For Then execute..., choose either Respond With Specified Content or Override.

    image

    Action

    Item

    Description

    Respond with Specified Content

    Status Code

    Optional. Default value: 200.

    Content-Type Response Header

    Optional. Default value: application/octet-stream.

    Location Response Header

    Optional. The HTTP header is not responded to by default. The maximum size is 1024 bytes.

    Response Body

    Optional. This parameter is empty by default, which means that the HTTP body is empty. The maximum size is 1024 bytes.

    Override

    Origin Pool

    Specifies the origin pool.

    Fallback Pool

    Specifies the fallback pool.

    Traffic Steering Policy

    Specifies the traffic steering policy.

    Session Persistence

    Enable or disable session persistence.

    Region-level Pool

    Region-level origin pool.

    Subregion-level Pool

    Subregion-level origin pool within the corresponding region.

    Load Balancer TTL

    Controls the time-to-live of packets in the network.

    Terminate

    Terminates the matching and running of the custom rule for the load balancer.

  6. Click Complete.