Skip to content
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

Support follow_symlink in Bazel environment for static file mounting #1512

Closed
allene-ha opened this issue Nov 11, 2024 · 2 comments
Closed
Labels
enhancement New feature or request needs-triage

Comments

@allene-ha
Copy link

allene-ha commented Nov 11, 2024

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!

@dosubot dosubot bot added the enhancement New feature or request label Nov 11, 2024
@dokterbob
Copy link
Collaborator

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 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
@allene-ha
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants