chainlit
chainlit copied to clipboard
HTTPS support for dev server
trafficstars
Describe the bug
Now there are hardcoded values in both backend and frontend which break https and custom host support when developing application with chainlit.
To Reproduce Steps to reproduce the behavior:
- Enable HTTPs and/or custom host using environment variables
- Try different screnarios
As far as I know:
- Hardcoded
httpin server, so you receive
Your app is available at http://localhost:8000
https://github.com/Chainlit/chainlit/blob/61143ac80711a25aadc0fc9833da3c95d9b31da0/backend/chainlit/server.py#L89-L92
by default even when https enabled. You also will receive "Empty response" error in opened browser page
- Hard coded
http://localhost:8000for dev server in frontend, so you can't debug frontend ifhttpsor custom host enabled https://github.com/Chainlit/chainlit/blob/61143ac80711a25aadc0fc9833da3c95d9b31da0/frontend/src/api/index.ts#L6 - No e2e tests for these screnarios (
httpsand custom host)
Expected behavior Both cases should be seamlessly supported