fix: use correct URL scheme when SSL is configured#2819
Merged
hayescode merged 1 commit intoChainlit:mainfrom Mar 5, 2026
Merged
fix: use correct URL scheme when SSL is configured#2819hayescode merged 1 commit intoChainlit:mainfrom
hayescode merged 1 commit intoChainlit:mainfrom
Conversation
Detect SSL configuration to display correct URL in startup message. Make frontend dev server URL configurable via VITE_API_URL env var.
hayescode
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fix the startup URL to use
https://when SSL certificates are configured, and make the frontend dev server URL configurable.Closes #1766
Why
The startup message always shows
http://even when--ssl-certand--ssl-keyare provided. The frontend also hardcodeshttp://localhost:8000for dev mode, preventing HTTPS development.Changes
backend/chainlit/server.py: Detectconfig.run.ssl_certto choosehttpsorhttpscheme in startup URLfrontend/src/api/index.ts: UseVITE_API_URLenv var (falling back tohttp://localhost:8000) for configurable dev server URLUsage
Testing
Without SSL: behavior unchanged. With SSL: correct
https://URL displayed.Summary by cubic
Fixes the startup URL to use https when SSL certs are provided and makes the frontend dev API URL configurable. This enables HTTPS development and avoids misleading http links.
Bug Fixes
New Features
Written for commit 0793b5f. Summary will update on new commits.