-
Notifications
You must be signed in to change notification settings - Fork 281
Consider X-Forwarded-Proto when setting the Request's originalRef property. #1191
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
Comments
Forgot to mention I'm currently using v2.3.5. |
thboileau
added a commit
that referenced
this issue
Feb 20, 2016
thboileau
added a commit
that referenced
this issue
Feb 20, 2016
thboileau
added a commit
that referenced
this issue
Feb 20, 2016
thboileau
added a commit
that referenced
this issue
Feb 20, 2016
thboileau
added a commit
that referenced
this issue
Feb 20, 2016
thboileau
added a commit
that referenced
this issue
Feb 20, 2016
Hi @jwinfield , thanks a lot for this suggestion. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HTTPS enabled load balancers like Amazon's ELB that forward client requests to HTTP servers behind the load balancer set the
X-Forwarded-Proto
request header with a value ofhttps
. If the call is forwarded to a HTTP Restlet application from the load balancer, the originalRef Request property uses the protocol of the target request without checking if theX-Forwarded-Proto
is set and using that protocol scheme instead.This becomes a problem for resources that need to redirect when handling a request. Extra code needs to be written into the application code to look for the
X-Forwarded-Proto
header explicitly when building the redirect URL instead of using values fromgetRequest().getOriginalRef()
. Also for static content resources served by aDirectoryService
, they will have an incorrect protocol set for theContent-Location
URL.The text was updated successfully, but these errors were encountered: