Closed
Description
The use case:
I'm running FastAPI behind a nginx reverse proxy, at the path http://localhost/api/
. The documentation front ends (swagger and redoc) are expecting openapi.json
at http://localhost/openapi.json
but it's actually routed at http://localhost/api/openapi.json
.
Setting openapi_url
to /api/openapi.json
also changes the openapi.json
path, so now it's looking for (through the proxy) http://localhost/api/api/openapi.json
.
Ideally, it'd be great if we could specify the "public path" for the api. That's how e.g. vue does it