Skip to content

Commit

Permalink
Disable Cleartext Transmission for stats login when ssl is enabled fo…
Browse files Browse the repository at this point in the history
…r VHost
  • Loading branch information
fluser committed Mar 24, 2020
1 parent b6a85d3 commit 62d78a4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions engine/PerlLib/Package/WebStatistics/AWStats/AWStats.pm
Expand Up @@ -542,6 +542,23 @@ sub _addAwstatsSection

return 0 if $tplName ne 'domain.tpl' || $data->{'FORWARD'} ne 'no';

if ( $data->{'VHOST_TYPE'} eq 'domain' && $data->{'SSL_SUPPORT'} ) {
${ $cfgTpl } = replaceBloc(
"# SECTION addons BEGIN.\n",
"# SECTION addons END.\n",
" # SECTION addons BEGIN.\n"
. getBloc(
"# SECTION addons BEGIN.\n",
"# SECTION addons END.\n",
${ $cfgTpl }
)
. " RedirectMatch 301 ^/stats\/?\$ https://$data->{'DOMAIN_NAME'}/stats/\n"
. " # SECTION addons END.\n",
${ $cfgTpl }
);
return 0;
}

${ $cfgTpl } = replaceBloc(
"# SECTION addons BEGIN.\n",
"# SECTION addons END.\n",
Expand Down

0 comments on commit 62d78a4

Please sign in to comment.