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

Preserve root path when mounting as FastAPI sub-application #1594

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AnysSido
Copy link

Currently, when Chainlit is mounted as a FastAPI sub-application, the mount_chainlit function overrides the root path with the sub-application path. This prevents Chainlit from correctly serving static files since the full path is not preserved.

This change ensures that when a root path is provided, it is preserved and combined with the sub-application path during mounting.

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. backend Pertains to the Python backend. labels Dec 19, 2024
@AnysSido AnysSido closed this Dec 19, 2024
@AnysSido AnysSido reopened this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Pertains to the Python backend. size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant