Chainlit / chainlit

Build Conversational AI in minutes ⚡️
https://docs.chainlit.io
Apache License 2.0
6.25k stars 799 forks source link

Serve chainlit app from a subdirectory #521

Open ArthurJahn opened 8 months ago

ArthurJahn commented 8 months ago

The docs says that

"Currently, you have to serve your Chainlit app from the root of your domain/subdomain. This means that you can’t serve it from a subdirectory like example.com/my-app."

So, I'd like to be able to serve the app from different base path, like setting a base tag or something.

willydouhard commented 8 months ago

Yes this is a current limitation. Setting a subdomain and serving the app from the subdomain root is not an option for you?

ArthurJahn commented 8 months ago

Yes, we can mitigate that way, but a best solution for us would be to serve the app from a subdir. I can work on that if you guys think it's a nice feature to be added and if there is no known limitations to develop that feature.

willydouhard commented 8 months ago

Would love contributions on that topic! I don't think we have any particular requirements except for the http endpoints to work correctly (maybe also oauth redirections). We do have the concept of CHAINLIT_URL already to help with tricky oauth redirections.