Help Center> Web Application Firewall> Best Practices> Configuring Accept-Encoding Field Forwarding and Disabling Response Packet Compression
Updated on 2024-04-10 GMT+08:00

Configuring Accept-Encoding Field Forwarding and Disabling Response Packet Compression

The client usually declares that response compression is supported in the Accept-Encoding header, for example, Accept-Encoding: gzip. After the response passes through WAF, WAF considers that the response meets the compression standard and compresses the response. However, after receiving the response, the client cannot automatically decompress the response packet. The website then responds abnormally.

To address this issue, you can rewrite the Accept-Encoding header for the domain name on the WAF console so that WAF does not compress the response.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner of the management console and select a region or project.
  3. Click in the upper left corner and choose Web Application Firewall under Security & Compliance.
  4. In the navigation pane on the left, choose Website Settings.
  5. In the Domain Name column, click the website domain name to go to the basic information page.
  6. In the Forward Field column, click . In the displayed Forward Field dialog box, enter a key/value pair, and click Add.

    Set Key to Accept-Encoding and Value to identity.

    Figure 1 Forward Field

  7. Click Confirm.