aboutsummaryrefslogtreecommitdiffstats
path: root/config/squidGuard
diff options
context:
space:
mode:
Diffstat (limited to 'config/squidGuard')
-rw-r--r--config/squidGuard/sgerror.php10
-rw-r--r--config/squidGuard/squidguard_default.xml9
2 files changed, 18 insertions, 1 deletions
diff --git a/config/squidGuard/sgerror.php b/config/squidGuard/sgerror.php
index 8084c5c3..e1e49385 100644
--- a/config/squidGuard/sgerror.php
+++ b/config/squidGuard/sgerror.php
@@ -1,4 +1,6 @@
<?php
+include "globals.inc";
+include "config.inc";
$page_info = <<<EOD
# ----------------------------------------------------------------------------------------------------------------------
# SquidGuard error page generator
@@ -204,13 +206,19 @@ function get_page($body) {
function get_error_page($er_code_id, $err_msg='') {
global $err_code;
global $cl;
+ global $g;
+ global $config;
$str = Array();
header("HTTP/1.1 " . $err_code[$er_code_id]);
$str[] = '<html>';
$str[] = '<body>';
- $str[] = '<h3>Request denied by pfSense proxy: ' . $err_code[$er_code_id] . '</h3>';
+ if ($config['installedpackages']['squidguarddefault']['config'][0]['deniedmessage']) {
+ $str[] = "<h3>{$config['installedpackages']['squidguarddefault']['config'][0]['deniedmessage']}: {$err_code[$er_code_id]}</h3>";
+ } else {
+ $str[] = "<h3>Request denied by {$g['product_name']} proxy: {$err_code[$er_code_id]}</h3>";
+ }
if ($err_msg) $str[] = "<b> Reason: </b> $err_msg";
$str[] = '<hr size="1" noshade>';
if ($cl['a']) $str[] = "<b> Client address: </b> {$cl['a']} <br>";
diff --git a/config/squidGuard/squidguard_default.xml b/config/squidGuard/squidguard_default.xml
index 6fae67c6..ff05085a 100644
--- a/config/squidGuard/squidguard_default.xml
+++ b/config/squidGuard/squidguard_default.xml
@@ -62,6 +62,15 @@
</description>
<type>checkbox</type>
</field>
+ <field>
+ <fielddescr>Proxy Denied Error</fielddescr>
+ <fieldname>deniedmessage</fieldname>
+ <description>The first part of the error message displayed to clients when denied. Defaults to "Request denied by $g['product_name'] proxy"</description>
+ <type>textarea</type>
+ <cols>65</cols>
+ <rows>2</rows>
+ </field>
+
<field>
<fielddescr>Redirect mode</fielddescr>
<fieldname>redirect_mode</fieldname>