Issue deploying Chainlit app through FastAPI

I built a Python app using the Chainlit library and am trying to deploy it as a FastAPI app on Posit Connect. See FastAPI - Chainlit

I'm able to deploy the app and the /docs and /app endpoint work fine, but when I actually try to run the app through /chainlit, I get redirected to 127.0.0.1 and the page is not found. I've tried variations to set the host to 0.0.0.0, but nothing seems to work as if the settings are being overridden somewhere. I'm able to run the app through FastAPI locally just fine using uvicorn.

I've also tried uploading as a generic app with a custom manifest.json and I still have the same issue. Has anyone else experienced anything like this?