Merge pull request #1721 from webmin/dev/force-no-port-with-custom-host

Fix to allow no port with custom redirect host
This commit is contained in:
Jamie Cameron
2022-08-21 10:43:14 -07:00
committed by GitHub

View File

@@ -1573,6 +1573,8 @@ if (defined($header{'host'})) {
$ssl = $config{'redirect_ssl'} ne '' ? $config{'redirect_ssl'} :
$use_ssl || $config{'inetd_ssl'};
$redirport = $config{'redirect_port'} || $port;
$redirport = $config{'redirect_port'}
if ($config{'redirect_host'});
$portstr = $redirport == 80 && !$ssl ? "" :
$redirport == 443 && $ssl ? "" : ":".$redirport;
$redirhost = $config{'redirect_host'} || $host;