Preserve reverse proxy prefixes in WebJar trailing-slash redirects
Author: arnabnandy7Created Oct 1, 2026Updated Oct 1, 2026
Labelstriage/needs-triage
When a WebJar-based UI is exposed through a reverse proxy that adds and strips an external path prefix, requesting the UI path without a trailing slash loses that prefix.
For example, a request to:
https://example.com/prefix/q/swagger-ui
receives an absolute redirect such as:
Location: /q/swagger-ui/
Following it sends the browser outside /prefix. The redirect generated by WebJarStaticHandler should preserve the externally visible request path, for example by using a relative Location header.
This was noticed while validating quarkusio/quarkus#56953 behind a prefix-stripping reverse proxy. The behavior is shared by WebJar-based UIs and is not specific to Swagger UI.
Source: quarkusio/quarkus