2 Catalyst::Plugin::RequireSSL - Force SSL mode on select pages
7 MyApp->setup( qw/RequireSSL/ );
9 MyApp->config->{require_ssl} = {
10 https => 'secure.mydomain.com',
11 http => 'www.mydomain.com',
15 # in any controller methods that should be secured
19 Use this plugin if you wish to selectively force SSL mode on some of
20 your web pages, for example a user login form or shopping cart.
22 Simply place $c->require_ssl calls in any controller method you wish to
25 This plugin will automatically disable itself if you are running under
26 the standalone HTTP::Daemon Catalyst server. A warning message will be
27 printed to the log file whenever an SSL redirect would have occurred.
30 If you utilize different servers or hostnames for non-SSL and SSL
31 requests, and you rely on a session cookie to determine redirection (i.e
32 for a login page), your cookie must be visible to both servers. For more
33 information, see the documentation for the Session plugin you are using.
36 Configuration is optional. You may define the following configuration
41 If your SSL domain name is different from your non-SSL domain, set this
46 If you have set the https value above, you must also set the hostname of
51 If you'd like your users to remain in SSL mode after visiting an
52 SSL-required page, you can set this option to 1. By default, this option
53 is disabled and users will be redirected back to non-SSL mode as soon as
58 Call require_ssl in any controller method you wish to be secured.
62 The browser will be redirected to the same path on your SSL server. POST
63 requests are never redirected.
66 When viewing an SSL-required page that uses static files served from the
67 Static plugin, the static files are redirected to the non-SSL path.
69 In order to get the correct behaviour where static files are not
70 redirected, you should use the Static::Simple plugin or always serve
71 static files directly from your web server.
74 Catalyst, Catalyst::Plugin::Static::Simple
77 Andy Grundman, <andy@hybridized.org>
80 This program is free software, you can redistribute it and/or modify it
81 under the same terms as Perl itself.