Clustericious::RouteBuilder::Proxy -- build proxy routes easily
use My::Object::Class; use Clustericious::RouteBuilder; use Clustericious::RouteBuilder::Proxy "proxy" => { to => "http://google.com:80", strip_prefix => "/google", -as => "proxy_google", }, "proxy" => { app => 'MyServer', -as => "proxy_local" }, proxy_service => { # Bulk mapping services => { "froogle" => "http://froogle.com", "fraggle" => "http://fraggle.com" } }; ... get '/google/:somewhere' => \&proxy_google; get '/something/:somewhere' => \&proxy_local; get '/:service/(*whatever)' => \&proxy_service;
This package provides routes for proxying. It rewrites urls by stripping prefixes, and passes the rest on by prepending a given url to the incoming request.
more documentation
To install Clustericious, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Clustericious
CPAN shell
perl -MCPAN -e shell install Clustericious
For more information on module installation, please visit the detailed CPAN module installation guide.