@@ -, +, @@ sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -out SSLEngine on SSLCertificateFile /etc/apache2/server.crt SSLCertificateKeyFile /etc/apache2/server.key a2enmod ssl service apache2 restart --- C4/Auth.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -306,6 +306,12 @@ sub get_template_and_user { } # these template parameters are set the same regardless of $in->{'type'} + + # Set the using_https variable for templates + # FIXME Under Plack the CGI->https method always returns 'OFF' + my $https = $in->{query}->https(); + my $using_https = (defined $https and $https ne 'OFF') ? 1 : 0; + $template->param( "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, EnhancedMessagingPreferences => C4::Context->preference('EnhancedMessagingPreferences'), @@ -324,7 +330,7 @@ sub get_template_and_user { singleBranchMode => C4::Context->preference("singleBranchMode"), XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"), XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"), - using_https => $in->{'query'}->https() ? 1 : 0, + using_https => $using_https, noItemTypeImages => C4::Context->preference("noItemTypeImages"), marcflavour => C4::Context->preference("marcflavour"), persona => C4::Context->preference("persona"), --