[Dbix-class] Force https in generated URIs

xli xli4022 at gmail.com
Tue Aug 9 21:16:01 GMT 2011


>> 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 };

>Cheers
>t0m

How can this, or something like this, be applied to just one
controller, and not the whole app?
i.e., how can all the methods in just one controller be forced to use https,
including the css and images that need to be served?



More information about the DBIx-Class mailing list