forked from leedo/Plack-App-Proxy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
38 lines (29 loc) · 902 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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