Implemented detach_on_redirect config option.
[catagits/Catalyst-Plugin-RequireSSL.git] / t / lib / TestApp / Controller / SSL.pm
CommitLineData
b67d9207 1package TestApp::Controller::SSL;
4585dfb1 2
3use strict;
b67d9207 4use base 'Catalyst::Controller';
4585dfb1 5
6sub secured : Local {
7 my ( $self, $c ) = @_;
8
9 $c->require_ssl;
10
11 $c->res->output( 'Secured' );
12}
13
14sub unsecured : Local {
15 my ( $self, $c ) = @_;
16
17 $c->res->output( 'Unsecured' );
18}
19
c4744895 20sub maybe_secured : Local {
21 my ( $self, $c ) = @_;
22
23 $c->allow_ssl;
24
25 $c->res->output( 'Maybe secured' );
26}
27
794abe2a 28sub test_detach : Local {
29 my ( $self, $c ) = @_;
30
31 $c->require_ssl;
32
33 $c->res->redirect('http://www.mydomain.com/redirect_from_the_action');
34
35 $c->res->output( 'Test detach' );
36}
37
38
4585dfb1 391;