From: t0m Date: Wed, 8 Jul 2009 21:07:57 +0000 (+0100) Subject: Make Makefile.PL maintain README X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-TraitFor-Request-ProxyBase.git;a=commitdiff_plain;h=ac304f06747acc441c09a9f47f7de5dc9fc15eae Make Makefile.PL maintain README --- diff --git a/Makefile.PL b/Makefile.PL index b777624..a7ada01 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -5,15 +5,22 @@ use inc::Module::Install 0.91; name 'Catalyst-TraitFor-Request-ProxyBase'; all_from 'lib/Catalyst/TraitFor/Request/ProxyBase.pm'; +requires 'URI'; requires 'Moose'; requires 'namespace::autoclean'; -build_requires 'Catalyst::Runtime' => '5.80007'; -build_requires 'CatalystX::RoleApplicator' => '0.005'; -build_requires 'Test::More'; +test_requires 'Catalyst::Runtime' => '5.80007'; +test_requires 'CatalystX::RoleApplicator' => '0.005'; +test_requires 'Test::More'; +test_requires 'HTTP::Request::Common'; resources repository => 'http://github.com/bobtfish/catalyst-traitfor-request-proxybase'; license 'perl'; WriteAll(); +if ($Module::Install::AUTHOR) { + system("pod2text lib/Catalyst/TraitFor/Request/ProxyBase.pm > README") + and die; +} + diff --git a/README b/README index e69de29..5947122 100644 --- a/README +++ b/README @@ -0,0 +1,64 @@ +NAME + Catalyst::TraitFor::Request::ProxyBase - + +SYNOPSIS + package MyApp; + use Moose; + use namespace::autoclean; + + use Catalyst; + use CatalystX::RoleApplicator; + + extends 'Catalyst'; + + __PACKAGE__->apply_request_class_roles(qw/ + Catalyst::TraitFor::Request::ProxyBase + /); + + __PACKAGE__->setup; + +DESCRIPTION + This module is a Moose::Role which allows you more flexibility in your + application's deployment configurations when deployed behind a proxy. + + The problem is that there is no standard way for a proxy to tell a + backend server what the original URI for the request was, or if the + request was initially SSL. (Yes, I do know about "X-Forwarded-Host", but + they don't do enough) + + This creates an issue for someone wanting to deploy the same cluster of + application servers behind various URI endpoints. + + Using this module, the request base ("$c->req->base") is replaced with + the contents of the "X-Request-Base" header, which is expected to be a + full URI, for example: + + http://example.com + https://example.com + http://other.example.com:81/foo/bar/yourapp + + This value will then be used as the base for uris constructed by + "$c->uri_for". + +REQUIRED METHODS + base + secure + +WRAPPED METHODS + base + secure + +BUGS + Probably. Patches welcome, please fork from: + + http://github.com/bobtfish/catalyst-traitfor-request-proxybase + + and send a pull request. + +AUTHOR + Tomas Doran (t0m) "" + +COPYRIGHT + This module is Copyright (c) 2009 Tomas Doran and is licensed under the + same terms as perl itself. +