Customizing Blocked HTML Template Page
When Web Safety detects the prohibited access attempt, it replaces its contents with "403 Forbidden" HTTP error page. Template for this page is stored in /opt/websafety/etc/blocked_page.html
file. This is an ordinary HTMLs file which can be customized according to your needs. Upon blocking some macros in this file are replaced with their actual values.
Available macros include the following.
Macro | Description |
---|---|
INCIDENT | ID of the blocked HTTP object, this can later be used to find more information about the object in the access.log or in Web UI / Monitoring / Surfing History. |
USER_NAME, USER_IP and POLICY | User name (if set up in Squid), user IP address and matched filtering policy. |
URI | Requested URL of the blocked object. |
DURATION | Scan duration in milliseconds. |
MODULE | Name of the filtering module that blocked the object. |
RESULT_ID and RESULT_INFO | Detection results in human readable form (why the object was blocked). If object was blocked because of adult language detection the actual reason for blocking is within the HTML comments tag so that it is not directly visible. To see it right click on the blocked page in your browser and select Show HTML Source menu. To always show the detected information, clear the [ ] Hide explicit scan results on the blocked page checkbox in Safety / Policies / Policy / Advanced. |
VERSION | Version of the product. |
SERVERNAME | Name of the server where detection occurred. |
TIMESTAMP | Date and time of block. |
Note
When AdBlock or Online Privacy module detects a forbidden URL and browser that sent the request seems to be expecting the image back, Web Safety uses transparent gif located at /opt/websafety/etc/transparent.gif
as blocked placeholder. It hides the advertised images nicely in some browsers and improves usage experience of proxy users.