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
http in server, so you receive
Your app is available at http://localhost:8000
|
if host == DEFAULT_HOST: |
|
url = f"http://localhost:{port}{ROOT_PATH}" |
|
else: |
|
url = f"http://{host}:{port}{ROOT_PATH}" |
by default even when https enabled. You also will receive "Empty response" error in opened browser page
- Hard coded
http://localhost:8000 for dev server in frontend, so you can't debug frontend if https or custom host enabled
|
const devServer = 'http://localhost:8000' + getRouterBasename(); |
- No e2e tests for these screnarios (
https and custom host)
Expected behavior
Both cases should be seamlessly supported
Describe the bug
Now there are hardcoded values in both backend and frontend which break
httpsand custom host support when developing application with chainlit.To Reproduce
Steps to reproduce the behavior:
As far as I know:
httpin server, so you receivechainlit/backend/chainlit/server.py
Lines 89 to 92 in 61143ac
by default even when
httpsenabled. You also will receive "Empty response" error in opened browser pagehttp://localhost:8000for dev server in frontend, so you can't debug frontend ifhttpsor custom host enabledchainlit/frontend/src/api/index.ts
Line 6 in 61143ac
httpsand custom host)Expected behavior
Both cases should be seamlessly supported