From: Tomas Doran Date: Sat, 14 Jan 2012 19:08:25 +0000 (+0000) Subject: Version 0.07 X-Git-Tag: v0.07^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-RequireSSL.git;a=commitdiff_plain Version 0.07 --- diff --git a/Changes b/Changes index 6766675..8bda5f0 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,6 @@ Revision history for Perl extension Catalyst::Plugin::RequireSSL -0.07 2010-04-02 07:28:00 +0.07 2011-01-14 19:07:00 - Converted to use Module::Install instead of Module::Build. - Removed unused 'default' method from the app (triggered a deprecation warning). - Fix Perl Critic test for hard tabs (t0m) diff --git a/README b/README index 7f28ce9..ec16a7a 100644 --- a/README +++ b/README @@ -3,16 +3,20 @@ NAME SYNOPSIS # in MyApp.pm - use Catalyst; - MyApp->setup( qw/RequireSSL/ ); - - MyApp->config->{require_ssl} = { - https => 'secure.mydomain.com', - http => 'www.mydomain.com', - remain_in_ssl => 0, - no_cache => 0, - detach_on_redirect => 1, - }; + use Catalyst qw/ + RequireSSL + /; + __PACKAGE__->config( + require_ssl => { + https => 'secure.mydomain.com', + http => 'www.mydomain.com', + remain_in_ssl => 0, + no_cache => 0, + detach_on_redirect => 1, + }, + ); + __PACKAGE__->setup; + # in any controller methods that should be secured $c->require_ssl; diff --git a/lib/Catalyst/Plugin/RequireSSL.pm b/lib/Catalyst/Plugin/RequireSSL.pm index 8ba4e0f..3c65666 100644 --- a/lib/Catalyst/Plugin/RequireSSL.pm +++ b/lib/Catalyst/Plugin/RequireSSL.pm @@ -110,16 +110,20 @@ Catalyst::Plugin::RequireSSL - Force SSL mode on select pages =head1 SYNOPSIS # in MyApp.pm - use Catalyst; - MyApp->setup( qw/RequireSSL/ ); - - MyApp->config->{require_ssl} = { - https => 'secure.mydomain.com', - http => 'www.mydomain.com', - remain_in_ssl => 0, - no_cache => 0, - detach_on_redirect => 1, - }; + use Catalyst qw/ + RequireSSL + /; + __PACKAGE__->config( + require_ssl => { + https => 'secure.mydomain.com', + http => 'www.mydomain.com', + remain_in_ssl => 0, + no_cache => 0, + detach_on_redirect => 1, + }, + ); + __PACKAGE__->setup; + # in any controller methods that should be secured $c->require_ssl;