(Optional) Enter a custom header name if your backend expects something else (like Navigate to SLB > Virtual Servers , select your VIP, and go to the Assign your new HTTP template in the Template HTTP 📄 Using aFleX for Custom Logic
Note: You can name the header anything, but "X-Forwarded-For" is the industry standard. 2. Apply the Template to a Virtual Port a10 x-forwarded-for
when HTTP_REQUEST # Check if the X-Forwarded-For header already exists if [HTTP::header exists "X-Forwarded-For"] # If it exists, append the current client IP # This creates a comma-separated list of IPs HTTP::header replace "X-Forwarded-For" "[HTTP::header value "X-Forwarded-For"], [IP::client_addr]" else # If it does not exist, create it with the client IP HTTP::header insert "X-Forwarded-For" [IP::client_addr] (Optional) Enter a custom header name if your
Install or use ARR (Application Request Routing) with the X-Forwarded-For module. Alternatively, modify web.config : Alternatively, modify web
A10-ADC(config)# slb template http HTTP_XFF_TEMPLATE A10-ADC(config-http)# insert-client-ip X-Forwarded-For Use code with caution.
Three common failure modes in A10 XFF setups:
Before diving into A10 specifics, let’s clarify the header itself.