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
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).
The text was updated successfully, but these errors were encountered:
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 thespin.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).The text was updated successfully, but these errors were encountered: