eclipse-ee4j / eclipse-ee4j/jersey

X-Forwarded-* aware UriInfo.getBaseBuilder

Open
#2,716 5 comments 0 reactions 0 assignees View on GitHub
Component: core Priority: Major Type: Improvement
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

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](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]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.