-
Notifications
You must be signed in to change notification settings - Fork 52
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
Valid sub-routes for the UI app result in 404 #899
Comments
Does this mean that to get to let's say |
Yes that's exactly the issue |
Pffff that sounds awful. So I would be in favour of finding a better way to deal with routes. |
Exactly. The current configuration defeats the whole point of adding URL routing to the UI app. Part of the argument for getting rid of the tabbed interface was that a user could ctrl- or cmd-click on environments to open them in a new browser tab rather than a new Conda Store UI tab. But if we can't load the UI at URLs like /:namespace/:environment, then that ability to open environments directly in a new tab (or share them with others via URL) does not work. I believe the usual solution here is to create catch-all or fallback route on the server that serves conda-store-ui.html. Right now, I believe the server is configured to serve that file at one and only one URL: "/" by default, or "/conda-store" in other configurations. |
I assigned you @gabalafou and @peytondmurray - I would like you two to figure a solution to this. |
For my understanding, when a user pastes https://example.com/conda-store/foo/bar
Is that right? |
Yes! Except it's not technically a redirect. It's not a 301. It's a 200 and you serve the conda-store-ui.html template at /foo/bar. |
Cool, thanks for the clarification - that solution sounds reasonable to me. @gabalafou Feel free to pick this up as time permits. |
Should we redirect all unknown routes to the React (UI) app?
When a user goes directly to a React app-defined sub-route (by sub-route I mean any route that is not the root route, "/"), such as "/:namespace/new-environment", the server will return a 404 instead of returning the conda-store-ui.html page.
We should probably redirect all unknown routes to the React (UI) app, conda-store-ui.
That way a user can copy-paste a link like "https://example.com/conda-store/default/new-environment" directly into their browser, as opposed to always having to start from "https://example.com/conda-store". Being able to load non-root routes was the whole point of introducing URL routing into the front end.
The text was updated successfully, but these errors were encountered: