chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

feat: add ssl support using custom key/cert files

Open dahifi opened this issue 1 year ago • 4 comments

Someone on the discord asked for a way to run the app behind https, so I added a run config parameters to accept keyfile and cert paths, and pass them to uvicorn.

I was unable to run commit hooks on this, nor did I test, but putting this here to see if anyone can validate or pick it up from here.

dahifi avatar Apr 23 '24 17:04 dahifi

@dahifi if I add those changes to my local, I it will work? or is incomplete ? the added parameters must be provided as environment vars or running paremeters in chainlit executable ?

Best regards!

puppetm4st3r avatar Apr 27 '24 20:04 puppetm4st3r

Thanks for your PR, there is a similar one here: https://github.com/Chainlit/chainlit/pull/905

Do you have more background as to why folks who want to create a publicly accessible Chainlit instance without having a proxy in front of it?

tpatel avatar Apr 30 '24 09:04 tpatel

in my case the reverse proxy + chainlit + serving wasm artifacts didnt liked it to iOS devices, so I have solved appliying this PR and removing the nginx reverse proxy for serving the ssl and works fine.... and its a clearer solution for lite infrastructure use cases.

puppetm4st3r avatar Apr 30 '24 12:04 puppetm4st3r

Thanks for your PR, there is a similar one here: #905

Do you have more background as to why folks who want to create a publicly accessible Chainlit instance without having a proxy in front of it?

localhost

veeragoni avatar May 06 '24 17:05 veeragoni

@dahifi Same request, thanks man, good job. Waiting for the merge.

yiouyou avatar May 28 '24 15:05 yiouyou

@tpatel This merge is quite useful when running the voice feature of chainlit. Could you check if it's ready to merge? If there's a simple document of --ssl-cert etc on the repo main page, that would be very useful.

Thanks!

yiouyou avatar May 30 '24 12:05 yiouyou

closing in favor of https://github.com/Chainlit/chainlit/pull/1047 (I've made the change there).

tpatel avatar May 31 '24 09:05 tpatel