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 different routing modes #51

Open
fibonacci1729 opened this issue Dec 9, 2024 · 0 comments
Open

Support different routing modes #51

fibonacci1729 opened this issue Dec 9, 2024 · 0 comments

Comments

@fibonacci1729
Copy link
Contributor

Currently the Router routes requests using the incoming requests .path() which is absolute as opposed to matching against the matched suffix stripped of the route specified in the spin.toml. This has been reported as a source of confusion a few times in discord.

I think supporting both routing modes specified via configuration passed to the router constructor is a decent short term solution. Longer term we should probably rollout a deprecation of the ambiguous .handle(...) method on the router in favor of explicit methods for both modes (e.g. .handle_matching_suffix(...) and .handle_absolute(...) -- or whatever names).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant