[Catalyst] X-Forwarded-Path

Stephen Shorrock stephen.shorrock at gmail.com
Wed Oct 10 13:34:57 GMT 2012


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/

On the backend my application is run via starman and has contained in
its configuration:

    name => 'CUFSE',
    using_frontend_proxy => 1,

I would there for expect that when calling $c->uri_for('some/path') I would get:


but the frontend portion of the path is not there instead I only have:


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:

Thanks in advance


More information about the Catalyst mailing list