NAME

Clustericious::RouteBuilder::Proxy -- build proxy routes easily

SYNOPSIS

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;

DESCRIPTION

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.

TODO

more documentation