Hi,
When I want to share my python script with colleagues to use, I made it a FastAPI app. It serves a front page as a simple interface in addition to API calls.
It runs fine locally. When I open url http://127.0.0.1:8000
or http://127.0.0.1:8000/index.html
the front page shows. The docs
page (http://127.0.0.1:8000/docs
) also works
However once published to our Connect server, the front page does not show. docs
page works though.
When I put the direct link URL in, the page is just blank; the same blank page happens to direct.url.link/index.html
. (direct.url.link/docs
shows the the API document as it should)
When I intentionally spell index.html
wrong, like direct.url.link/index.htm
, the page returns 'not found' response:
{
"detail": "Not Found"
}
which means the API works properly; but FastAPI served page does not.
Is this an issue with Connect Server config or the app needs to be modification to work properly?
Thanks for any insight!