mirror of https://github.com/mikaku/Monitorix.git
fixed a bug in CGI that prevented honoring the 'hostname' configuration option
This commit is contained in:
parent
48aad4df9f
commit
4ec1e63f69
|
@ -212,7 +212,7 @@ my $conf = new Config::General(
|
|||
%config = $conf->getall;
|
||||
|
||||
$config{url} = $ENV{HTTPS} ? "https://" . $ENV{HTTP_HOST} : "http://" . $ENV{HTTP_HOST};
|
||||
$config{hostname} = $ENV{SERVER_NAME};
|
||||
$config{hostname} = $config{hostname} || $ENV{SERVER_NAME};
|
||||
if(!($config{hostname})) { # called from the command line
|
||||
$config{hostname} = "127.0.0.1";
|
||||
$config{url} = "http://127.0.0.1";
|
||||
|
|
Loading…
Reference in New Issue