-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
71 lines (48 loc) · 2.09 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
NAME
Plack::Middleware::Proxy::Requests - Forward proxy server
SYNOPSIS
# In app.psgi
use Plack::Builder;
use Plack::App::Proxy;
builder {
enable "Proxy::Connect";
enable "Proxy::AddVia";
enable "Proxy::Requests";
Plack::App::Proxy->new->to_app;
};
# From shell
plackup -s Twiggy -E Proxy -e 'enable q{AccessLog}' app.psgi
# or
twiggy -MPlack::App::Proxy \
-e 'enable q{AccessLog}; enable q{Proxy::Connect}; \
enable q{Proxy::AddVia}; enable q{Proxy::Requests}; \
Plack::App::Proxy->new->to_app'
DESCRIPTION
This module handles HTTP requests as a forward proxy server.
Its job is to set a plack.proxy.url environment variable based on
REQUEST_URI variable.
The HTTP responses from the Internet might be invalid. In that case it
is required to run the server without Plack::Middleware::Lint module.
This module is started by default and disabled if -E or
--no-default-middleware option is used when starting plackup script.
Note that this disables also Plack::Middleware::AccessLog so it has to
be enabled explicitly if needed.
The default server Plack::Server::PSGI alias Standalone can hang up on
the stalled connection. It is better to run a proxy server with
Starlet, Starman or Twiggy.
SEE ALSO
Plack, Plack::App::Proxy, Plack::Middleware::Proxy::Connect,
Plack::Middleware::Proxy::AddVia, Starlet, Starman, Twiggy.
BUGS
If you find the bug or want to implement new features, please report it
at
https://github.com/dex4er/perl-Plack-Middleware-Proxy-Requests/issues
The code repository is available at
http://github.com/dex4er/perl-Plack-Middleware-Proxy-Requests
AUTHOR
Piotr Roszatycki <dexter@cpan.org>
LICENSE
Copyright (c) 2012-2013, 2023 Piotr Roszatycki <dexter@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as perl itself.
See http://dev.perl.org/licenses/artistic.html