Bug 8952: (follow-up) using_https does not deal with Plack
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 23 May 2013 15:28:25 +0000 (17:28 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 5 May 2014 04:01:28 +0000 (04:01 +0000)
commit3070650200a80de23a4744da1b5490f98c6e36e2
tree3c9bd51a02b4b832fa19994c90ef201c099a6c85
parenta1febe1c1e714be1a9355f9d520ba39a02a9622a
Bug 8952: (follow-up) using_https does not deal with Plack

When using Plack, the https method returns 'OFF'.
We have to test this value before sending the value to templates.

Test plan:
1/ Fill your OPACBaseUrl

2/ Configure apache for using http
3/ Check the social networks links (should be http://OPACBaseUrl)

4/ Launch Plack
5/ Check the social networks link (should be http://OPACBaseUrl)
6/ Stop Plack

7/ Configure apache for using https
  sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -out
/etc/apache2/server.crt -keyout /etc/apache2/server.key
and add in you virtualhost (with :443)
    SSLEngine on
    SSLCertificateFile /etc/apache2/server.crt
    SSLCertificateKeyFile /etc/apache2/server.key
  a2enmod ssl
  service apache2 restart
8/ Check the social networks links (should be https://OPACBaseUrl)

FIXME: Under Plack, with ssl actived, the CGI->https() method always
returns 'OFF'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Auth.pm