mirror of
https://github.com/webmin/webmin.git
synced 2025-07-20 16:48:46 +00:00
Fix to always enable HSTS
This commit is contained in:
9
setup.sh
9
setup.sh
@ -818,6 +818,9 @@ if [ "$upgrading" != 1 ]; then
|
||||
if [ "$licence_module" != "" ]; then
|
||||
echo licence_module=$licence_module >>$config_dir/config
|
||||
fi
|
||||
|
||||
# Enable HSTS by default
|
||||
echo "ssl_hsts=1" >> $config_dir/miniserv.conf
|
||||
|
||||
# Disallow unknown referers by default
|
||||
echo "referers_none=1" >>$config_dir/config
|
||||
@ -830,6 +833,12 @@ else
|
||||
grep logclear= $config_dir/miniserv.conf >> $config_dir/config
|
||||
fi
|
||||
|
||||
# Enable HSTS by default if not set
|
||||
grep ssl_hsts= $config_dir/miniserv.conf >/dev/null
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "ssl_hsts=1" >> $config_dir/miniserv.conf
|
||||
fi
|
||||
|
||||
# Disallow unknown referers if not set
|
||||
grep referers_none= $config_dir/config >/dev/null
|
||||
if [ "$?" != "0" ]; then
|
||||
|
Reference in New Issue
Block a user