ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Append Additional Values to a User-Agent Header


Article ID: 169261


Updated On:


ProxySG Software - SGOS


The User-Agent HTTP header includes a single value, and is not designed to include additional details. However, you can use policy substitution to maintain the original User-Agent value and append new values. The substitution string appears as follows: $(request.header.User-Agent)

$(user) and $(client.address) are what you want to append to the header.

define action ModifyUserAgent
    set(request.header.User-Agent, "$(request.header.User-Agent); $(user); $(client.address) ")
end action ModifyUserAgent

<Proxy> action.ModifyUserAgent(yes)