fixed to handle correctly the 'https_url' option

This commit is contained in:
Jordi Sanfeliu 2013-11-28 13:02:35 +01:00
parent e92c6f097c
commit 1be43d91f9
1 changed files with 2 additions and 1 deletions

View File

@ -215,7 +215,8 @@ my $conf = new Config::General(
);
%config = $conf->getall;
$config{url} = ($ENV{HTTPS} || $config{https_url} eq "y") ? "https://" . $ENV{HTTP_HOST} : "http://" . $ENV{HTTP_HOST};
print "https_url = " . $config{httpd_builtin}->{https_url} . "<br>";
$config{url} = ($ENV{HTTPS} || ($config{httpd_builtin}->{https_url} || "n") 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";