Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

put HTTP_REQUEST_BASE support back from Dancer 1 #571

Closed
wants to merge 3 commits into from

Conversation

fayland
Copy link
Contributor

@fayland fayland commented Apr 24, 2014

I think it is still needed in Dancer2 when tested in our server.

the code is copied from Dancer::Request.

Thanks

@veryrusty
Copy link
Member

@fayland thanks for the Pr. Just wondering if you have looked at using Plack::Middleware::ReverseProxyPath which I think is a more generic piece of middleware that solves (what I see as) the problem here?

@fayland
Copy link
Contributor Author

fayland commented Apr 24, 2014

I did give it a try but it's not working for me. maybe I configured wrongly though. Sorry I do not have much time to debug on those modules.

veryrusty added a commit that referenced this pull request May 22, 2014
Uses existing plack middlewares (ReverseProxy and ReverseProxyPath) to
handle all request header modification when operating behing a proxy. Allows
for variants (eg HTTP_X_FORWARDED_PROTOCOL) supported by Dancer(2) but not
from those existing ReverseProxy middleware.

Special cases REQUEST_BASE header to work with ReverseProxyPath so proxies
from/to non-root paths "just work"(tm). (Alternate to #571.)

As a middleware, devs get more flexability as to where to apply it; they can
use Plack::Builder to wrap this around their app as well as further path/header
altering middleware. This could be released as a seperate package; its not
Dancer2 specific.
veryrusty added a commit that referenced this pull request May 22, 2014
Includes tests when proxy is not from root (see #571)

Removes tests for ftp as the protocol behing a http proxy - it was silly
and ReverseProxy middleware doesn't support it.
@xsawyerx
Copy link
Member

I want to merge #590. If we do, we can close this.

@xsawyerx
Copy link
Member

Since Plack::Middleware::ReverseProxyPath is available, I think we should close this one. We should follow up on #590 for a comfortable way of integrating it.

@xsawyerx xsawyerx closed this Aug 15, 2015
xsawyerx pushed a commit that referenced this pull request Mar 31, 2022
Uses existing plack middlewares (ReverseProxy and ReverseProxyPath) to
handle all request header modification when operating behing a proxy. Allows
for variants (eg HTTP_X_FORWARDED_PROTOCOL) supported by Dancer(2) but not
from those existing ReverseProxy middleware.

Special cases REQUEST_BASE header to work with ReverseProxyPath so proxies
from/to non-root paths "just work"(tm). (Alternate to #571.)

As a middleware, devs get more flexability as to where to apply it; they can
use Plack::Builder to wrap this around their app as well as further path/header
altering middleware. This could be released as a seperate package; its not
Dancer2 specific.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants