Brian Duggan > Clustericious-0.9907 > Clustericious::RouteBuilder::Proxy

Download:
Clustericious-0.9907.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source   Latest Release: Clustericious-0.9937

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

syntax highlighting: