diff --git a/monitorix.cgi b/monitorix.cgi index a1b40d5..e29a553 100755 --- a/monitorix.cgi +++ b/monitorix.cgi @@ -215,7 +215,7 @@ my $conf = new Config::General( ); %config = $conf->getall; -$config{url} = $ENV{HTTPS} ? "https://" . $ENV{HTTP_HOST} : "http://" . $ENV{HTTP_HOST}; +$config{url} = ($ENV{HTTPS} || $config{https_url} eq "y") ? "https://" . $ENV{HTTP_HOST} : "http://" . $ENV{HTTP_HOST}; $config{hostname} = $config{hostname} || $ENV{SERVER_NAME}; if(!($config{hostname})) { # called from the command line $config{hostname} = "127.0.0.1";