Creating custom headers for Edge SWG (ProxySG)
search cancel

Creating custom headers for Edge SWG (ProxySG)

book

Article ID: 168178

calendar_today

Updated On:

Products

SG-300 SG-600 SG-510 SG-810 SG-9000 SG-900 SG-S500 SG-S400 Secure Web Gateway Virtual Appliance SG-S200 SWG VA-100

Issue/Introduction

In some situations the reporting Edge SWG (ProxySG) which uploads access logs is different than the proxy which creates a custom header, this article goes into the steps on how to implement it. 

Resolution

Add a custom header at the child proxy:


CPL:
define action my_rewrite
   set(request.x_header.Test, "Write_XXX to test" )
end

<Proxy>
   ALLOW action.my_rewrite(yes)

VPM (Web access layer):
User-added image


Use same header in the parent proxy:


For access logs use: request.x_header.Test
User-added image

To use it as a condition in VPM (under source use Request header object):
User-added image
To use it as a condition in CPL code:

<Proxy>
   ALLOW request.x_header.Test="Write_XXX to test"