Skip to content

UriInfo.getBaseUri ignores prefix header handling #50293

@shawkins

Description

@shawkins

Describe the bug

If you set quarkus.http.proxy.enable-forwarded-prefix=true and specify an X-Forwarded-Prefix header, that will not be reflected in getBaseUri - but will be present in the UriInfo.getRequestUri and UriInfo.getAbsolutePath.

Expected behavior

getBaseUri should have the prefix pre-pended.

Actual behavior

The prefix is omitted.

How to Reproduce?

With:

quarkus.http.proxy.proxy-address-forwarding=true
quarkus.http.proxy.allow-x-forwarded=true
quarkus.http.proxy.enable-forwarded-host=true
quarkus.http.proxy.enable-forwarded-prefix=true

Submit a request with the header "X-Forwarded-Prefix: prefix" and observe the base uri for the request does not reflect the prefix.

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

3.27.0

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

This is a follow-up to #46313

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions