add the ability to turn off forced-https
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 19 Mar 2008 16:31:02 +0000 (16:31 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 19 Mar 2008 16:31:02 +0000 (16:31 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9086 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/WWW/Proxy.pm

index c2a79e4..cc85633 100644 (file)
@@ -15,10 +15,12 @@ use OpenSRF::System;
 # set the bootstrap config and template include directory when 
 # this module is loaded
 my $bootstrap;
+my $ssl_off;
 
 sub import {
        my $self = shift;
        $bootstrap = shift;
+       $ssl_off = shift;
 }
 
 
@@ -45,7 +47,7 @@ sub handler {
        my $url = $cgi->url;
 
        # push everyone to the secure site
-       if ($url =~ /^http:/o) {
+       if (!$ssl_off && $url =~ /^http:/o) {
                $url =~ s/^http:/https:/o;
                print "Location: $url\n\n";
                return Apache2::Const::OK;