whisper-asr-webservice icon indicating copy to clipboard operation
whisper-asr-webservice copied to clipboard

Swagger UI won't work if API base path is used (e.g. uvicorn --root-path)

Open lc-spxl opened this issue 1 year ago • 1 comments

Hi, first of all, great work on this project!

I am trying to get it working behind a proxy that will forward request from /whisper

Following FastAPI docs I have been able to run the API properly.

My docker entrypoint now looks like this

uvicorn --host 0.0.0.0 --port 9000 --workers 1 app.webservice:app --root-path /whisper

One downside is that OpenAPI UI doesn't load properly as it always listen on /docs instead of /whisper/docs

I am not familiar with FastAPI library thus I have not been yet able to make it work, do you have a suggestion ?

I will be happy to provide a PR to support this feature, once sorted out.

Thank you Kind regards

lc-spxl avatar Jun 05 '23 09:06 lc-spxl