Make Makefile.PL maintain README
[catagits/Catalyst-TraitFor-Request-ProxyBase.git] / README
CommitLineData
ac304f06 1NAME
2 Catalyst::TraitFor::Request::ProxyBase -
3
4SYNOPSIS
5 package MyApp;
6 use Moose;
7 use namespace::autoclean;
8
9 use Catalyst;
10 use CatalystX::RoleApplicator;
11
12 extends 'Catalyst';
13
14 __PACKAGE__->apply_request_class_roles(qw/
15 Catalyst::TraitFor::Request::ProxyBase
16 /);
17
18 __PACKAGE__->setup;
19
20DESCRIPTION
21 This module is a Moose::Role which allows you more flexibility in your
22 application's deployment configurations when deployed behind a proxy.
23
24 The problem is that there is no standard way for a proxy to tell a
25 backend server what the original URI for the request was, or if the
26 request was initially SSL. (Yes, I do know about "X-Forwarded-Host", but
27 they don't do enough)
28
29 This creates an issue for someone wanting to deploy the same cluster of
30 application servers behind various URI endpoints.
31
32 Using this module, the request base ("$c->req->base") is replaced with
33 the contents of the "X-Request-Base" header, which is expected to be a
34 full URI, for example:
35
36 http://example.com
37 https://example.com
38 http://other.example.com:81/foo/bar/yourapp
39
40 This value will then be used as the base for uris constructed by
41 "$c->uri_for".
42
43REQUIRED METHODS
44 base
45 secure
46
47WRAPPED METHODS
48 base
49 secure
50
51BUGS
52 Probably. Patches welcome, please fork from:
53
54 http://github.com/bobtfish/catalyst-traitfor-request-proxybase
55
56 and send a pull request.
57
58AUTHOR
59 Tomas Doran (t0m) "<bobtfish@bobtfish.net>"
60
61COPYRIGHT
62 This module is Copyright (c) 2009 Tomas Doran and is licensed under the
63 same terms as perl itself.
64