swagger icon indicating copy to clipboard operation
swagger copied to clipboard

Cannot try/execute endpoints within the swagger GUI when exposing it under a different path prefix via a reverse-proxy

Open mgoltzsche opened this issue 1 year ago • 0 comments

When exposing the swagger GUI under a path prefix using a reverse-proxy that sends the X-Forwarded-Prefix HTTP request header (which is already honoured when building the redirect URL) one cannot try/execute the endpoints since the reverse-proxy-defined path prefix is not honoured by the GUI.

A potential solution could be to replace the base URL within the served swagger doc.json on a per-request basis so that the JS logic within the GUI knows about it.

mgoltzsche avatar Dec 26 '24 23:12 mgoltzsche