Commit | Line | Data |
b67d9207 |
1 | package TestApp::Controller::SSL; |
4585dfb1 |
2 | |
3 | use strict; |
b67d9207 |
4 | use base 'Catalyst::Controller'; |
4585dfb1 |
5 | |
6 | sub secured : Local { |
7 | my ( $self, $c ) = @_; |
8 | |
9 | $c->require_ssl; |
10 | |
11 | $c->res->output( 'Secured' ); |
12 | } |
13 | |
14 | sub unsecured : Local { |
15 | my ( $self, $c ) = @_; |
16 | |
17 | $c->res->output( 'Unsecured' ); |
18 | } |
19 | |
c4744895 |
20 | sub maybe_secured : Local { |
21 | my ( $self, $c ) = @_; |
22 | |
23 | $c->allow_ssl; |
24 | |
25 | $c->res->output( 'Maybe secured' ); |
26 | } |
27 | |
794abe2a |
28 | sub 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 |
39 | 1; |