-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chainlit is failing to render UI when executed through Bazel since 0.6.1 #317
Comments
Can you try adding follow_symlink=True to your local installation and see if it fixes the issue? |
Sure. I verified js/css files load successfully when follow_symlink option is added. Here's the snippet of my patch:
|
@MathiasSpanhove do you see any security issue with this? |
I don't think it will be a security issue. It's a mount to the chainlit build directory so I don't think that users will be able to upload files to it and somehow using symlinks try to extract secrets. (See Zip Slip / Zip Symlink Upload Attack for examples) If you really want to be safe, you could make it opt-in using configuration. Interesting info about it from the starlette team themselves: |
The |
Verified that the issue is fixed in 0.6.401. Thank you! |
I have a Bazel-based workspace setup for a Chainlit app development. I have a py_binary target for a Chainlit app and it was working fine until 0.6.0. However, with 0.6.1 and later versions, the server starts fine but the UI is failing to render because the requests to js/css files fail. Here are the logs:
I suspect this commit because Bazel creates symbolic links to dependent packages when setting up an execution sandbox directory. Maybe passing follow_symlink=True to the StaticFiles constructor may solve this problem.
The text was updated successfully, but these errors were encountered: