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
Description:
I encountered an issue when trying to serve static files in my Chainlit app using Bazel. Files in the public directory weren’t being mounted successfully. After debugging, I found that adding the follow_symlink=config.project.follow_symlink parameter to this mount function resolved the issue, allowing static files to be served as expected in the Bazel environment.
Could this parameter be set to config.project.follow_symlink by default in future releases? This would help improve compatibility with Bazel and similar environments that rely on symlinks for dependencies.
Additional Context:
A similar issue was reported in #317, where adding follow_symlink=True resolved the problem for Bazel setups. Implementing this change directly would prevent repeated manual adjustments.
Thank you!
The text was updated successfully, but these errors were encountered:
Thanks for the feedback. I'm happy to merge a PR clarifying this parameter and it's use case but for security reasons it's generally considered a bad idea to follow symlinks, especially to do it by default!
allene-ha
changed the title
Support follow_symlink=True in Bazel environment for static file mounting
Support follow_symlink in Bazel environment for static file mounting
Nov 12, 2024
Thank you for the explanation. I’ve recognized the potential security risks associated with follow_symlink=True. Would it be possible to add support for follow_symlink as a parameter? This way, I could control the setting through configuration rather than it being enabled by default.
Description:
I encountered an issue when trying to serve static files in my Chainlit app using Bazel. Files in the public directory weren’t being mounted successfully. After debugging, I found that adding the
follow_symlink=config.project.follow_symlink
parameter to this mount function resolved the issue, allowing static files to be served as expected in the Bazel environment.Could this parameter be set to
config.project.follow_symlink
by default in future releases? This would help improve compatibility with Bazel and similar environments that rely on symlinks for dependencies.Additional Context:
A similar issue was reported in #317, where adding
follow_symlink=True
resolved the problem for Bazel setups. Implementing this change directly would prevent repeated manual adjustments.Thank you!
The text was updated successfully, but these errors were encountered: