The Edge Security Acceleration (ESA) managed transform feature automatically adds headers to origin requests to record information such as the real client IP, geolocation, and TLS fingerprint. This feature can also add standard security headers to client responses, which simplifies configuring common request and security headers.
How it works
When you enable a managed transform, ESA adds a set of common origin request and security response headers at a point of presence (POP). The workflow is as follows:
HTTP request headers (Client → ESA → Origin server): When a point of presence (POP) receives a client request, it adds specific HTTP request headers as configured before forwarding the request to your origin server. These headers include the following:
Type
Included header
Description
Add real client IP header
ali-real-client-ipRecords the real client IP address of the client that established the TCP connection. This header is added by ESA at the point of presence (POP) and is more trustworthy than the
X-Forwarded-Forheader, which can be spoofed by clients.Add visitor location headers
ali-ip-countryali-ip-city
Based on the real client IP, ESA queries the IP geolocation database and adds the corresponding country/region and city codes as header values. The header value uses the two-letter Alpha-2 country/region code defined in ISO 3166-1. For example,
ali-ip-country=cnindicates that the client IP geolocation is in the Chinese mainland.Add security request headers
Tls-HashTls-Ja3Tls-Ja4
Analyzes the client's TLS handshake information to generate JA3 and JA4 fingerprints. These fingerprints help identify client types or detect bots. The headers include
Tls-Hash,Tls-Ja3, andTls-Ja4.The TLS fingerprint headers are populated only for websites on the enterprise plan.
Account security risk information
Esa-User-RiskAfter you enable the Account Security (ATO) feature, requests automatically send account security risk information to the origin server. This includes the account identifier and a risk score. For example,
account_name:test2***@gmail.com;risk_coefficient:85indicates that the account name istest****@gmail.comand the risk score is 85.This header does not need to be manually configured on the Managed Transforms page. The system automatically adds it to the origin request after you enable the Account Security feature.
HTTP response headers (ESA → Client): When ESA receives a response from the origin server, it adds a set of standard security response headers based on your configuration before returning the response to the client.
NoteIf a response from your origin server already includes a security header with the same name, ESA overwrites the header value from the origin server by default to ensure policy consistency.
Type
Included header
Description
Add security response headers
x-content-type-options: nosniffPrevents MIME-type confusion attacks by requiring the browser to strictly follow the
Content-Typedeclared in the response header. Thenosniffvalue enables this strict mode.x-xss-protection: 1; mode=blockProtects against reflected cross-site scripting (XSS) attacks, where malicious scripts are injected through URL parameters. The value
1enables the XSS filter. The valuemode=blockprevents the page from rendering if the filter is triggered.x-frame-options: SAMEORIGINRestricts how pages can be embedded to protect against clickjacking attacks. The value
SAMEORIGINallows embedding only by pages from the same origin. For example, a page fromexample.comcan be framed only by other pages onexample.com.referrer-policy: same-originControls Referer header leakage to avoid exposing user navigation paths in cross-origin requests. The value
same-originsends the full Referer only for same-origin requests. No Referer is sent for cross-origin requests.expect-ct: max-age=86400, enforceThis header helps detect non-compliant certificates. The value
max-age=86400sets the policy's validity period to 24 hours. The valueenforcerequires the browser to reject connections that do not meet Certificate Transparency requirements.
Configure client information for request analysis
This feature automatically adds HTTP headers with the real client IP, geolocation, and TLS fingerprint to origin requests, providing more client context for your application.
Procedure
On the ESA console, select Websites. In the Website column, click the target website.
In the left-side navigation pane, choose .
On the Transform Rules page, click the Managed Transforms tab.

Select the headers you require.
Add real client IP header: Sends the
ali-real-client-ipheader to allow your origin server to obtain the real client IP address of the client that initiated the request. Click Configure, turn on the Status switch, choose to use the defaultali-real-client-ipor specify a custom header name, and then click OK.
Add Visitor Location Headers: Sends the
ali-ip-countryandali-ip-cityheaders to allow your origin server to obtain the client's country/region and city codes.
Add Security Request Headers: Sends headers such as
Tls-Hash,Tls-Ja3, andTls-Ja4to provide your origin server with information for identifying client types or detecting bots.
Result
To verify the configuration, monitor the origin requests from ESA on your origin server and check the logs.
Before you enable the feature
Only basic request headers are included.

After you enable the feature
After you enable Add real client IP header, Add Visitor Location Headers, and Add Security Request Headers in ESA, the origin request includes headers such as ali-ip-country, Tls-Hash, Tls-Ja3, Tls-Ja4, ali-ip-city, and ali-real-client-ip.
Get client IPs in IPv4 format
After you enable managed transform, the format of the real client IP recorded in the ali-real-client-ip header depends on the protocol of the point of presence (POP) that the client connects to. If a client connects through an IPv6 POP, the header value is in IPv6 format.
To get the real IP in IPv4 format, disable the IPv6 switch in Configure network optimization. After you disable this switch, clients access the service through an IPv4 POP, and the value of the ali-real-client-ip header will be in IPv4 format.
Configure security response headers
This feature automatically adds standard security headers to client responses to defend against attacks like XSS and clickjacking, enhancing your web application's security.
Procedure
On the ESA console, select Websites. In the Website column, click the target website.
In the left-side navigation pane, choose .
On the Transform Rules page, click the Managed Transforms tab.

In the Add Security Response Headers section, turn on the switch to add security headers to client responses.

Result
To verify the configuration, open the developer tools in your browser and check the response headers under .
Before you enable the feature
Only basic response headers are included.

After you enable the feature
After you enable Add Security Response Headers in ESA, the response includes the following headers: expect-ct: max-age=86400, enforce, referrer-policy: same-origin, x-content-type-options: nosniff, x-xss-protection: 1; mode=block, and x-frame-options: SAMEORIGIN.