Hello,
I am trying to encrypt / decrypt all the paths used in my application
for encrypting , i simply overloaded uri_for method to return encrypted
link..
however..I did not find any clean (simple) way to decrypt the same .
Heres what I am doing as of now..
sub prepare_path {
## overloading system method
my $c = shift;
$c->NEXT::prepare_path( @_ );
## define or get $crypt
$c->{request}->{path} = $crypt->decrypt($c->req->path , "my secret
key");
$c->log->debug( "after prepare_path" . $c->req->path );
return $c;
## continue the request flow
}
I am basically overwriting $c->{request}->{path} variable...its dirty but it
works...I do not know if it works with Apache or any other engine..as I have
tested only with the test server.
it also works with inline arguments ..viz /foo/arg1/arg2 ..I am not sure at
which point catalyst actually converts "arg1" and "arg2" into method
arguments ..
is there a better way to do this ??
--
Harshal Shah
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/