Append Additional Values to a User-Agent Header

book

Article ID: 169261

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

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)

Example:
$(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>
    url.domain=upload.bluecoat.com action.ModifyUserAgent(yes)