How to strip the "user-agent" header on a ProxySG appliance outgoing connection

book

Article ID: 168279

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

At times, a ProxySG appliance administrator requires that the user-agent header be stripped from the outgoing connection. This article presents a series of CPL code which does that.

Resolution

Install the following CPL to strip the  user-agent header on the outgoing connection.
 
define condition UserAgentList1
   request.header.User-Agent="<Your user-agent header in regex>"
end condition UserAgentList1

define action SuppressHeaders1
   delete(request.header.User-Agent)
end action SuppressHeaders1

<Proxy>
   condition=UserAgentList1 action.SuppressHeaders1(yes) ; Rule 1