Commit 45c4c11f authored by Frédéric LIETART (TheLinuxFr)'s avatar Frédéric LIETART (TheLinuxFr) Committed by Franco Fichtner

Added ability to change the hostname and admin email in Proxy

(cherry picked from commit 3bcaaa9b)
(cherry picked from commit 98b3b2b2)
(cherry picked from commit fe8706b6)
(cherry picked from commit c013ef01)
(cherry picked from commit a6dcd976)
parent 65147668
...@@ -74,6 +74,20 @@ ...@@ -74,6 +74,20 @@
<help><![CDATA[Select what to do with X-Forwarded for header.]]></help> <help><![CDATA[Select what to do with X-Forwarded for header.]]></help>
<advanced>true</advanced> <advanced>true</advanced>
</field> </field>
<field>
<id>proxy.general.VisibleHostname</id>
<label>Visible Hostname</label>
<type>text</type>
<help><![CDATA[This is the hostname to be displayed in proxy server error messages.]]></help>
<advanced>true</advanced>
</field>
<field>
<id>proxy.general.VisibleEmail</id>
<label>Administrator's Email</label>
<type>text</type>
<help><![CDATA[This is the email address displayed in error messages to the users.]]></help>
<advanced>true</advanced>
</field>
<field> <field>
<id>proxy.general.suppressVersion</id> <id>proxy.general.suppressVersion</id>
<label>Suppress version string</label> <label>Suppress version string</label>
......
...@@ -69,6 +69,17 @@ ...@@ -69,6 +69,17 @@
<default>0</default> <default>0</default>
<Required>N</Required> <Required>N</Required>
</suppressVersion> </suppressVersion>
<VisibleEmail type="EmailField">
<default>admin@localhost</default>
<Required>N</Required>
<ValidationMessage>Please enter a valid email address.</ValidationMessage>
</VisibleEmail>
<VisibleHostname type="TextField">
<default>localhost</default>
<Required>N</Required>
<mask>/^([0-9a-zA-Z\.,_\-:]){0,1024}$/u</mask>
<ValidationMessage>Please enter a valid servername, ip address or leave this option blank.</ValidationMessage>
</VisibleHostname>
<cache> <cache>
<local> <local>
<enabled type="BooleanField"> <enabled type="BooleanField">
......
...@@ -530,3 +530,11 @@ delay_parameters 1 {{OPNsense.proxy.general.traffic.OverallBandwidthTrotteling|i ...@@ -530,3 +530,11 @@ delay_parameters 1 {{OPNsense.proxy.general.traffic.OverallBandwidthTrotteling|i
{% endif %} {% endif %}
# Disable squid logfile rotate to use system defaults # Disable squid logfile rotate to use system defaults
logfile_rotate 0 logfile_rotate 0
{% if helpers.exists('OPNsense.proxy.general.VisibleHostname') %}
# Define visible hostname
visible_hostname {{OPNsense.proxy.general.VisibleHostname}}
{% endif %}
{% if helpers.exists('OPNsense.proxy.general.VisibleEmail') %}
# Define visible email
cache_mgr {{OPNsense.proxy.general.VisibleEmail}}
{% endif %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment