I have python-eve behind an nginx reverse proxy, served at /api rather than /. However, the execution links in the basePath generated by eve-swagger is taken from URL_PREFIX, so excludes the /api and simply returns /.
This means that the Swagger UI does not work when executing the requests. Unfortunately, SwaggerUIBundle does not support setting a custom baseRef. I have solved this by declaring a new swagger route and hardcoding the basePath, however it seems like this is a common production use-case, so I'm wondering if there is a better way of achieving this?
Incidentally, on the Eve side, the paths are handled with this Flask snippet.
I have python-eve behind an nginx reverse proxy, served at
/api
rather than/
. However, the execution links in the basePath generated by eve-swagger is taken from URL_PREFIX, so excludes the/api
and simply returns/
.This means that the Swagger UI does not work when executing the requests. Unfortunately, SwaggerUIBundle does not support setting a custom baseRef. I have solved this by declaring a new swagger route and hardcoding the basePath, however it seems like this is a common production use-case, so I'm wondering if there is a better way of achieving this?
Incidentally, on the Eve side, the paths are handled with this Flask snippet.