[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] AlwaysSecure with wildcards



On May 29, 2007, at 11:46 AM, Jon Jensen wrote:

On Tue, 29 May 2007, Bill Carr wrote:

Is there anyway to specify wildcards with the AlwaysSecure directive? For example I would like to be able to do:

AlwaysSecure ord/* admin/*

I don't believe there is. I've wanted that before and looked, but didn't find it. I'd be happy to see a patch for it. :)
--- interchange-5.4.1/lib/Vend/Util.pm 2005-12-23 10:47:52.000000000 -0500 +++ interchange/lib/Vend/Util.pm 2007-05-29 12:39:02.000000000 -0400
@@ -1242,6 +1242,15 @@
if($opt->{secure} or exists $Vend::Cfg->{AlwaysSecure} {$path}) {
                $r = $Vend::Cfg->{SecureURL};
+       } else {
+ for my $secure_path (keys %{$Vend::Cfg-> {AlwaysSecure}}) {
+                       next unless $secure_path =~ /\*/;
+                       $secure_path =~ s/\*/.*/;
+                       if ($path =~ /$secure_path/) {
+                               $r = $Vend::Cfg->{SecureURL};
+                               last;
+                       }
+               }
        }
        $path = escape_chars_url($path)

Bill Carr
Bottlenose - Wine & Spirits eBusiness Specialists
(877) 857-6700
http://www.bottlenose-wine.com

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.