[Catalyst] Force https in generated URIs

Tomas Doran bobtfish at bobtfish.net
Thu Aug 4 15:44:43 GMT 2011

On 4 Aug 2011, at 16:18, Tobias Klug wrote:
> I am looking for a way to configure Catalyst in a way that all URIs
> generated are forced to use https.

Add this to your app class:

around uri_for => sub { my ($orig, $ctx, @args) = @_; my $uri = $ctx-> 
$orig(@args); $uri->secure(1); $uri };


More information about the Catalyst mailing list