From: Ian Jackson Date: Fri, 18 Jan 2013 19:20:40 +0000 (+0000) Subject: redirect to https version only if $encrypted_only X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=b8ede59f7a75024d7cf3397083ac7461dd013591;p=cgi-auth-flexible.git redirect to https version only if $encrypted_only --- diff --git a/cgi-auth-flexible.pm b/cgi-auth-flexible.pm index 4ab430d..fbb9ab3 100644 --- a/cgi-auth-flexible.pm +++ b/cgi-auth-flexible.pm @@ -506,7 +506,7 @@ sub _check_divert_core ($) { my $cooks = $r->_ch('get_cookie'); - if (!$r->_ch('check_https')) { + if ($r->{S}{encrypted_only} && !$r->_ch('check_https')) { return ({ Kind => 'REDIRECT-HTTPS', Message => $r->_gt("Redirecting to secure server..."), CookieSecret => undef,