Sergej Zoubok wrote:
> Hi all,
>
> I have a urgent (for me, anyway) question.
>
> Is there a way to ensure that a CGI::App application only loads a given
> runmode (or all, for that matter) via SSL? I've read the archives and
> know that CGI has an https() method for determining if SSL is in effect,
> but It's unclear how to proceed from there. There's a pending plug-in
> request on the wiki but no further notes on the implementation options.
> Mod-Rewrite is not an option for me, at least not on short notice (like
> today!).
You could do something like this in your run mode:
if( !$self->query->https ) {
my $new_url = $self->query->url(-full => 1);
$new_url =~ s/http:/https:/;
$self->header_type('redirect');
$self->header_add(-uri => $new_url);
return ' ';
}
--
Michael Peters
Developer
Plus Three, LP
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]