How to apply the custom exception page to all the proxy exceptions for a multi-tenant policy.
search cancel

How to apply the custom exception page to all the proxy exceptions for a multi-tenant policy.

book

Article ID: 278083

calendar_today

Updated On:

Products

ISG Proxy ProxySG Software - SGOS

Issue/Introduction

Proxy is having a multi-tenant policy enabled.

Proxy allows a way to custom an exception page like adding a company logo and contact details and the KB below provides the steps to do it.

https://knowledge.broadcom.com/external/article/166045/how-to-create-a-custom-exception-page-us.html

However, it does not apply to all the proxy exceptions because it depends on the rule or policy that needs to trigger it. If you notice in the KB above, there is a step to create a rule or policy with a condition to trigger the custom exception page.

There is a requirement to apply this based on certain tenants for all the exceptions.

Resolution

Below is an example of the policy that you could apply under the tenant.

define config.customer
string:contact("name: Contact Help Desk <br>phone: XXX-XXX-XXXX<br>email: [email protected]<br>")
boolean:exception.format.custom(true)
end

define string My_Exception_custom_format_global
><HTML><HEAD>
><TITLE>BlueCoat Proxy Error - $(appliance.name):::$(exception.summary):::$(exception.details)</TITLE>
><style>BODY {BACKGROUND-COLOR: steelblue;FONT-FAMILY: arial;}TH {BACKGROUND-COLOR:silver;COLOR:navy;FONT-WEIGHT:bold;}TD {BACKGROUND-COLOR:#eeeeee;}
></style></HEAD><BODY><center><TABLE border=10 cell-padding=5 width="80%">
><TR><Th><big>$(exception.summary) ($(exception.id))</big></th></TR>
><TR><TD><b><u>BlueCoat device:</u></b><br>$(appliance.name) ($(proxy.address))</td></TR><TR><TD><b><u>Explanation:</u></b><br>
>$(exception.details)<br>$(exception.help)</TD></TR><TR><TD><b><u>Help:</u></b><br>$(config.customer.contact)</TD></TR></TABLE></center>
></BODY></HTML>
end

<Proxy>
config.customer.exception.format.custom=true exception.format(My_Exception_custom_format_global)

 

You could update the policy above using CLI like the example below.

#(config) inline policy tenant tenant1 of

...<existing policy>...

define config.customer
string:contact("name: Contact Help Desk <br>phone: XXX-XXX-XXXX<br>email: [email protected]<br>")
boolean:exception.format.custom(true)
end

define string My_Exception_custom_format_global
><HTML><HEAD>
><TITLE>BlueCoat Proxy Error - $(appliance.name):::$(exception.summary):::$(exception.details)</TITLE>
><style>BODY {BACKGROUND-COLOR: steelblue;FONT-FAMILY: arial;}TH {BACKGROUND-COLOR:silver;COLOR:navy;FONT-WEIGHT:bold;}TD {BACKGROUND-COLOR:#eeeeee;}
></style></HEAD><BODY><center><TABLE border=10 cell-padding=5 width="80%">
><TR><Th><big>$(exception.summary) ($(exception.id))</big></th></TR>
><TR><TD><b><u>BlueCoat device:</u></b><br>$(appliance.name) ($(proxy.address))</td></TR><TR><TD><b><u>Explanation:</u></b><br>
>$(exception.details)<br>$(exception.help)</TD></TR><TR><TD><b><u>Help:</u></b><br>$(config.customer.contact)</TD></TR></TABLE></center>
></BODY></HTML>
end

<Proxy>
config.customer.exception.format.custom=true exception.format(My_Exception_custom_format_global)

eof

 

The rule or policy will apply for all the request.