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

Automatic routing does not consider root path or mount location #908

Open
nmearl opened this issue Dec 3, 2024 · 0 comments
Open

Automatic routing does not consider root path or mount location #908

nmearl opened this issue Dec 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@nmearl
Copy link

nmearl commented Dec 3, 2024

Expected Behavior

When embedding a Solara application in a pre-existing Starlette application, automatic routing should consider the root-path command line argument, and generate paths based on the mounted location.

Current Behavior

Automatically generated paths in the Solara app will lead to the root of the Starlette application, where the Solara app is not mounted.

Steps to Reproduce the Problem

  1. Create a Starlette application as defined in the Embedding in an Existing Starlette Application page.
  2. Mount an existing multi-page Solara app as described in the documentation page.
  3. Run the uvicorn server as described, optionally adding SOLARA_ROOT_PATH="/solara" and/or SOLARA_BASE_URL="http://localhost:8865/solara/".
  4. Navigate to the mounted location of the Solara app (e.g. http://localhost:8865/solara).
  5. Observe that generated links in the Solara app are located at http://localhost/page1 and not http://localhost/solara/page1.

An example application utilizing the multi-page demo is available here: https://github.com/nmearl/solara-test

Specifications

  • Solara Version: 1.41.0
  • Platform: macOS 15.1.1
  • Affected Python Versions: 3.13.0
nmearl added a commit to nmearl/solara that referenced this issue Dec 3, 2024
@maartenbreddels maartenbreddels self-assigned this Dec 12, 2024
@maartenbreddels maartenbreddels added the bug Something isn't working label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants