首页 Edge Security Acceleration ESA (Next-Gen) User Guide Rules Examples Use case: Configure e-commerce security rules

Use case: Configure e-commerce security rules

更新时间: 2026-03-24 03:00:16

This use case demonstrates how to configure security rules to protect an e-commerce platform from traffic attacks.

Threat scenario

During major shopping events like the Double 11 global shopping festival, high-traffic e-commerce platforms become prime targets for malicious attacks. For example, an e-commerce platform experienced a traffic attack where a single client IP address initiated high-frequency requests, with a request rate more than 20 times that of a normal user. These attacks consume excessive server resources, degrade the user experience, and can even cause system outages or disrupt normal business transactions.

Create a security rule

Analysis shows that the attack originated from a single client IP address with a request rate 20 times higher than normal. To mitigate this threat, you can create a security rule to block this IP address. Follow these steps:

  1. On the ESA console, navigate to Websites. In the Website column, click the name of the target website.

  2. In the left navigation pane, choose Rules > Security Rules.

  3. On the Security Rules page, click Create Rule. In the dialog box, enter a name in the Rule Name field and select Filtered Requests.

  4. Under Filtered Requests, configure the match condition: select Client IP for the match field, select equals as the operator, and enter the IP address to block.

image

For more details on configuring rules, see Configure rules.

Verify the rule

Run the following command to test the rule. If the request is successfully blocked, the server returns an HTTP 403 status code.

curl -H "X-Forwarded-For: 192.168.0.1" https://www.example.com

What to do next

To prevent similar attacks in the future, you can create a rate limiting rule. For example, if the average request rate for a normal user is 1,200 requests per minute, you can configure a rule to trigger a slider CAPTCHA challenge for any client that exceeds 1,300 requests per minute.

With a slider CAPTCHA, the Web Application Firewall (WAF) serves a verification page to the client. If the client successfully completes the challenge, the WAF allows all subsequent requests from that client for a specified period (default: 30 minutes) without requiring re-verification. Otherwise, the WAF blocks the request.

  1. On the ESA console, navigate to Websites. In the Website column, click the name of the target website.

  2. In the left navigation pane, choose Security > WAF.

  3. On the Rate Limiting Rules tab, click Create Rule and configure the rule as shown in the following figure. For example, if the hostname is www.example.com and the request rate from a single client IP exceeds 1,300 requests per minute, trigger a slider CAPTCHA for all subsequent requests from that IP address for one hour.

    image

上一篇: Configure conditional origin fetch 下一篇: References