All Products
Search
Document Center

Edge Security Acceleration:Modify incoming HTTP request headers

Last Updated:Jun 13, 2025

By default, Dynamic Content Delivery Network (DCDN) supports request headers such as client IP addresses. You can rewrite HTTP headers in requests from users to points of presence (POPs) based on your needs.

Background information

HTTP request headers are a component of the header section in requests that are transmitted over HTTP. HTTP request headers include specific parameters that are sent to servers.

When points of presence (POPs) retrieve the requested resources from an origin server, the origin server can obtain information that is included in request headers. Dynamic Content Delivery Network (DCDN) allows you to rewrite HTTP headers in origin requests. The information that is included in request headers is passed to the origin server to meet specific business requirements. For example, you can configure the X-Forwarded-For (XFF) header to pass client IP addresses to your origin server.

For information about how the origin server obtains the IP address of a client from the XFF header in the origin request, see Retrieve the originating IP addresses of clients.

image

Usage notes

If the value of an HTTP request header is a variable, the variable is assigned a specific value when it is used.

The following table describes available variable:

Origin HTTP header

Description

$remote_addr

Adds a header that passes the client IP address to the origin server.

Procedure

  1. Log on to the DCDN console.

  2. In the left-side navigation pane, click Domain Names.

  3. On the Domain Names page, find the domain name that you want to manage and click Configure.

  4. In the left-side navigation tree of the domain name, click Origin Fetch.

  5. Click the Modify Incoming Request Header tab.

  6. Click Add.

  7. In the Add Custom HTTP Header dialog box, set Parameter and Value.

    配置回源HTTP头

    Parameter

    Example

    Description

    Parameter

    Custom Request Header

    You can select Custom Request Header or a preset header.

    Custom Parameter

    Content-Type

    Set the value to Content-Type.

    Value

    text/html

    You can specify one or more values for an origin header. Separate multiple values with commas (,).

    Rule Condition

    • Do not use conditions

    • Select the configured rule conditions in Rules engine.

    Rule conditions can identify parameters in a request to determine whether a configuration applies to the request.

  8. Click OK.