[Catalyst] X-Forwarded-Path
Tomas Doran
bobtfish at bobtfish.net
Wed Oct 10 16:41:06 GMT 2012
You're not doing anything wrong - there just isn't a common spec for doing this..
You probably want to be using Catalyst::TraitFor::Request::ProxyBase, which I wrote specifically for this use-case however :)
Cheers
t0m
On 10 Oct 2012, at 14:34, Stephen Shorrock wrote:
> Hi,
>
> Catalyst 5.90011
>
> I'm trying to run an application behind a frontend proxy where the
> path at the front end is not route:
>
> config on frontend.mydomain.ac.uk
>
> <Location /CUFSE>
> RewriteEngine On
> RewriteCond %{REMOTE_USER} (.+)
> RewriteRule . - [E=RU:%1]
> RequestHeader set REMOTE_USER %{RU}e
> RequestHeader set X-Forwarded-Path '/CUFSE'
> ProxyPass http://backend.mydomain.ac.uk:5000/
> ProxyPassReverse http://backend.mydomain.ac.uk:5000/
> </Location>
>
> On the backend my application is run via starman and has contained in
> its configuration:
>
> __PACKAGE__->config(
> name => 'CUFSE',
> using_frontend_proxy => 1,
> ...
>
> I would there for expect that when calling $c->uri_for('some/path') I would get:
>
> http://frontend.mydomain.ac.uk/CUFSE/some/path
>
> but the frontend portion of the path is not there instead I only have:
>
> http://frontend.mydomain.ac.uk/some/path
>
> I've attempted to grep all Perl modules for /X[_-]Forwarded[_-]Path/i
> but with no joy.
>
> Is the passing of the path supported or am I doing something incorrectly
>
> (source of method:
> http://wiki.catalystframework.org/wiki/wikicookbook/frontendproxy)
>
> Thanks in advance
>
> Stephen
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
More information about the Catalyst
mailing list