else {
$c->_ssl_strip_output(1);
$c->res->redirect( $redir );
+ $c->detach if $c->config->{require_ssl}->{detach_on_redirect};
}
}
}
http => 'www.mydomain.com',
remain_in_ssl => 0,
no_cache => 0,
+ detach_on_redirect => 1,
};
# in any controller methods that should be secured
If you have a wildcard certificate you will need to set this option if you are
using multiple domains on one instance of Catalyst.
+ detach_on_redirect
+
+By default C<< $c->require_ssl >> only calls C<< $c->response->redirect >> but
+does not stop request processing (so it returns and subsequent statements are
+run). This is probably not what you want. If you set this option to a true
+value C<< $c->require_ssl >> will call C<< $c->detach >> when it redirects.
+
=head1 METHODS
=head2 require_ssl