You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using version 1.1.302, I tried to deploy it using docker on certain cloud service. But it can only return a blank page while working well on my local machine.
The service URL is like http://example.com/some/endpoint, but chainlit is trying to get the assets from http://example.com/assets/..., thus returning a blank page and making it unusable. Unfortunately, it is not the case that can be solved by the --root-path config which is merged in #1064.
I found that this problem is caused by request rewriting, see the following for more details.
To Reproduce
I have also tried to reproduce this problem in a local environment using Nginx.
Use nginx to set up a proxy using a server config like
Set up chainlit service using demo.py like chainlit run demo.py -w --port 9000
Visit http://localhost:8080/endpoint and see a blank page
Expected behavior
Chainlit works well under proxy with request rewriting.
Screenshots
There are some screenshots from local test.
Successfully get the html file under proxy
Failed to get assets due to wrong prefix, the assets should be under /endpoint/assets
Additional context
As a temporary solution, I hard coded the root-path for frontend only, which means that I modified the following lines to make it works for me:
Describe the bug
Using version
1.1.302
, I tried to deploy it using docker on certain cloud service. But it can only return a blank page while working well on my local machine.The service URL is like
http://example.com/some/endpoint
, but chainlit is trying to get the assets fromhttp://example.com/assets/...
, thus returning a blank page and making it unusable. Unfortunately, it is not the case that can be solved by the--root-path
config which is merged in #1064.I found that this problem is caused by request rewriting, see the following for more details.
To Reproduce
I have also tried to reproduce this problem in a local environment using Nginx.
chainlit run demo.py -w --port 9000
http://localhost:8080/endpoint
and see a blank pageExpected behavior
Chainlit works well under proxy with request rewriting.
Screenshots
There are some screenshots from local test.
/endpoint/assets
Additional context
As a temporary solution, I hard coded the
root-path
for frontend only, which means that I modified the following lines to make it works for me:chainlit/backend/chainlit/server.py
Line 279 in abf4108
chainlit/backend/chainlit/server.py
Lines 309 to 311 in abf4108
The text was updated successfully, but these errors were encountered: