Modify exception page to show which policy rule blocked the webiste
search cancel

Modify exception page to show which policy rule blocked the webiste

book

Article ID: 249515

calendar_today

Updated On:

Products

Cloud Secure Web Gateway - Cloud SWG

Issue/Introduction

Blocked/exception page doesn't show which policy rule was executed for that block as it is described in Identify which rule was blocking the URL in Cloud SWG (formerly WSS)

Environment

Policies managed by Cloud Secure Web Gateway (Cloud SWG, formerly WSS) Portal

Cause

Exception page needs to be customized

Resolution

Steps to follow to show Error ID (rule ID) in the exception page:

  1. Go to "Policy > Response Pages" and select Custom tab
  2. Ensure "Custom Error Pages" are Enabled
  3. Search for the following section (this is where all the additional information is displayed if you click on "more" on the Access Denied page:
     <div id="additionalInfo" class="int curved">
         <ul>
             <li id="addIP"><span localize="[clientIP]">Client IP:</span> <span class="additional">$(client.effective_address)
                 <span class="displayNone">&#160;</span></span></li>
             <li id="addUserName"><span localize="[username]">Username:</span> <span class="additional">$(user)
                 <span class="displayNone">&#160;</span></span></li>
             <li id="addURL"><span localize="[URL]">URL:</span> <span class="additional" style="word-wrap: break-word">$(log_url)
                 <span class="displayNone">&#160;</span></span></li>
             <li id="addUserAgent"><span localize="[userAgent]">User Agent:</span>
                 <span class="additional">$(request.header.User-Agent)
                     <span class="displayNone">&#160;</span>
                 </span>
             </li>
         </ul>
     </div>
  4. Within that section, between last </li> and </ul> enter the lines marked in red:
     <div id="additionalInfo" class="int curved">
         <ul>
             <li id="addIP"><span localize="[clientIP]">Client IP:</span> <span class="additional">$(client.effective_address)
                 <span class="displayNone">&#160;</span></span></li>
             <li id="addUserName"><span localize="[username]">Username:</span> <span class="additional">$(user)
                 <span class="displayNone">&#160;</span></span></li>
             <li id="addURL"><span localize="[URL]">URL:</span> <span class="additional" style="word-wrap: break-word">$(log_url)
                 <span class="displayNone">&#160;</span></span></li>
             <li id="addUserAgent"><span localize="[userAgent]">User Agent:</span>
                 <span class="additional">$(request.header.User-Agent)
                     <span class="displayNone">&#160;</span>
                 </span>
             </li>
             <li id="addErrorId"><span>Error ID:</span>
                 <span class="additional">$(BC_exception_rationale)
                     <span class="displayNone">&#160;</span>
                 </span>
             </li>
         </ul>
     </div>
  5. Click on the "Preview" to check if the change was correctly applied. Now, buy clicking on "more" link you should see the "Error ID" line at the end which would be displaying which rule was executed for the block page: