Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (29 sloc) 0.902 kB
NAME
Plack::App::Proxy - proxy requests
SYNOPSIS
use Plack::Builder;
builder {
# proxy all requests to 127.0.0.1:80
mount "/static" => Plack::App::Proxy->new(host => "http://127.0.0.1:80")->to_app;
# use some logic to decide which host to proxy to
mount "/host" => Plack::App::Proxy->new(host => sub {
my $env = shift;
...
return $host;
})->to_app;
# use some logic to decide what url to proxy
mount "/url" => Plack::App::Proxy->new(url => sub {
my $env => shift;
...
return $url;
})->to_app;
};
DESCRIPTION
Plack::App::Proxy
AUTHOR
Lee Aylward
LICENSE
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
SEE ALSO
Plack::Builder
Jump to Line
Something went wrong with that request. Please try again.