LP104785: Selfcheck needs to be run with HTTPS
authorElliot Voris <evoris@slcconline.edu>
Mon, 9 Dec 2013 18:57:20 +0000 (12:57 -0600)
committerDan Scott <dscott@laurentian.ca>
Sun, 19 Jan 2014 19:14:08 +0000 (14:14 -0500)
Redirect attempts to connect to the self-check via HTTP to the more secure
HTTPS instead. Addresses this bug reported in launchpad:
https://bugs.launchpad.net/evergreen/+bug/1047485

Based on work for Apache 2.2 by Michael Peters <mrpeters@library.in.gov>,
updated and applied to 2.4 by Elliot Voris.

Signed-off-by: Elliot Voris <evoris@slcconline.edu>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/examples/apache/eg_vhost.conf.in
Open-ILS/examples/apache_24/eg_vhost.conf.in

index 1de2212..a6476aa 100644 (file)
@@ -134,6 +134,12 @@ RewriteRule /opac/[^/]*/skin/[^/]*/xml/rresult.xml /eg/opac/results?%{ENV:OILS_J
 # Images, CSS, etc can stick around.
 RewriteRule /opac/[^/]*/skin/.*(xml|htm|html|/)$ /eg/opac/home?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
 
+# -----------------------------------------------------------------------------$
+# Force HTTPS for /eg/circ/selfcheck
+# -----------------------------------------------------------------------------$
+RewriteCond %{HTTPS} off
+RewriteRule ^(/eg/circ/selfcheck) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
+
 # ----------------------------------------------------------------------------------
 # For sanity reasons, default indexes to Off
 # ----------------------------------------------------------------------------------
index f530f29..d561916 100644 (file)
@@ -134,6 +134,12 @@ RewriteRule /opac/[^/]*/skin/[^/]*/xml/rresult.xml /eg/opac/results?%{ENV:OILS_J
 # Images, CSS, etc can stick around.
 RewriteRule /opac/[^/]*/skin/.*(xml|htm|html|/)$ /eg/opac/home?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
 
+# -----------------------------------------------------------------------------$
+# Force HTTPS for /eg/circ/selfcheck
+# -----------------------------------------------------------------------------$
+RewriteCond %{HTTPS} off
+RewriteRule ^(/eg/circ/selfcheck) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
+
 # ----------------------------------------------------------------------------------
 # For sanity reasons, default indexes to Off
 # ----------------------------------------------------------------------------------