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
Tzal3x
changed the title
Common portal lib: Support path prefix matching for client-side routing.
Support path prefix matching for client-side routing.
Sep 24, 2024
Update the portal code so that it aligns with the changes made in #220
Changelog:
- [x] Create a `routing.ts` file containing the logic of parsing the
Routes dynamic field.
- [x] Add a function that finds if a path matches a route specified in
the Routes DF.
---------
Signed-off-by: giac-mysten <[email protected]>
Co-authored-by: giac-mysten <[email protected]>
Update the portal code so that it aligns with the changes made in #220
Changelog:
- [x] Create a `routing.ts` file containing the logic of parsing the
Routes dynamic field.
- [x] Add a function that finds if a path matches a route specified in
the Routes DF.
---------
Signed-off-by: giac-mysten <[email protected]>
Co-authored-by: giac-mysten <[email protected]>
In
ws-resources.json
, define routes pointing to other routes for client-side routing:The final goal is to specify routes like it's done in the nextjs middleware.
For starters, we can avoid complex expressions like
/some/*/path
and only implement patterns that end with wildcards like this:/some/path/*
.Implementation
ws-resources.json
in site resources.ws-resources.json
resource.When present, the portal prioritizes routing requests based on this configuration file before falling back to default routing mechanisms.
The text was updated successfully, but these errors were encountered: