chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

HTTPS support for dev server

Open asvishnyakov opened this issue 9 months ago • 2 comments
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:

  1. Enable HTTPs and/or custom host using environment variables
  2. Try different screnarios

As far as I know:

  • Hardcoded http in 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:8000 for dev server in frontend, so you can't debug frontend if https or custom host enabled https://github.com/Chainlit/chainlit/blob/61143ac80711a25aadc0fc9833da3c95d9b31da0/frontend/src/api/index.ts#L6
  • No e2e tests for these screnarios (https and custom host)

Expected behavior Both cases should be seamlessly supported

asvishnyakov avatar Jan 21 '25 13:01 asvishnyakov