RequireSSL, fixed to support other HTTP engines
[catagits/Catalyst-Plugin-RequireSSL.git] / lib / Catalyst / Plugin / RequireSSL.pm
index c9bc5d8..194661a 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use base qw/Class::Accessor::Fast/;
 use NEXT;
 
-our $VERSION = '0.05';
+our $VERSION = '0.06';
 
 __PACKAGE__->mk_accessors( qw/_require_ssl _ssl_strip_output/ );
 
@@ -66,7 +66,7 @@ sub setup {
     # support SSL
     # XXX: I didn't include Catalyst::Engine::Server here as it may be used as
     # a backend in a proxy setup.
-    if ( $c->engine eq "Catalyst::Engine::HTTP" ) {
+    if ( $c->engine =~ /Catalyst::Engine::HTTP/ ) {
         $c->config->{require_ssl}->{disabled} = 1;
         $c->log->warn( "RequireSSL: Disabling SSL redirection while running "
                      . "under " . $c->engine );