2 Catalyst::TraitFor::Request::ProxyBase - Replace request base with value
8 use namespace::autoclean;
11 use CatalystX::RoleApplicator;
15 __PACKAGE__->apply_request_class_roles(qw/
16 Catalyst::TraitFor::Request::ProxyBase
22 This module is a Moose::Role which allows you more flexibility in your
23 application's deployment configurations when deployed behind a proxy.
25 The problem is that there is no standard way for a proxy to tell a
26 backend server what the original URI for the request was, or if the
27 request was initially SSL. (Yes, I do know about "X-Forwarded-Host", but
30 This creates an issue for someone wanting to deploy the same cluster of
31 application servers behind various URI endpoints.
33 Using this module, the request base ("$c->req->base") is replaced with
34 the contents of the "X-Request-Base" header, which is expected to be a
35 full URI, for example:
39 http://other.example.com:81/foo/bar/yourapp
41 This value will then be used as the base for uris constructed by
53 Probably. Patches welcome, please fork from:
55 http://github.com/bobtfish/catalyst-traitfor-request-proxybase
57 and send a pull request.
60 Tomas Doran (t0m) "<bobtfish@bobtfish.net>"
63 This module is Copyright (c) 2009 Tomas Doran and is licensed under the
64 same terms as perl itself.