javaee / jersey

This is no longer the active Jersey repository. Please see the README.md
http://jersey.github.io
Other
2.86k stars 2.35k forks source link

X-Forwarded-* aware UriInfo.getBaseBuilder #2716

Open glassfishrobot opened 10 years ago

glassfishrobot commented 10 years ago

As far as I can see, UriInfo.getBaseBuilder() does not return a builder that is aware of headers like X-Forwarded-For or X-Forwarded-Proto. It would be great to be able to control this. It seems that the UriBuilder is created is container-specific - for instance, here it is created in a servlet context: https://github.com/jersey/jersey/blob/master/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/ServletContainer.java#L518 The headers are still the same in any context, though.

The benefit here is that this will prevent developers from having to manually handle this in their resources, making both developing and deploying Jersey applications easier.

Affected Versions

[2.7]

glassfishrobot commented 10 years ago

Reported by vetler

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA JERSEY-2444