Encapsulate logic for determining if an SSL request has been made.
Refactor core modules to use that.
This commit is contained in:
parent
39127b7ec0
commit
1c9908f490
5 changed files with 23 additions and 17 deletions
|
|
@ -1273,11 +1273,7 @@ sub getUrl {
|
|||
and -e $self->getPath . '/.cdn' )
|
||||
{
|
||||
my $sep = '/'; # separator, if not already present trailing
|
||||
if ($cdnCfg->{'sslAlt'}
|
||||
and ( $self->session->env->get('HTTPS') eq 'on'
|
||||
or $self->session->env->get('SSLPROXY') )
|
||||
)
|
||||
{
|
||||
if ($cdnCfg->{'sslAlt'} && $self->session->env->sslRequest) {
|
||||
if ( $cdnCfg->{'sslUrl'} ) {
|
||||
substr( $cdnCfg->{'sslUrl'}, -1 ) eq '/' and $sep = '';
|
||||
$url = $cdnCfg->{'sslUrl'} . $sep . $self->getDirectoryId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue