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
I too think it's reasonable, because koa-mount makes it possible to code the sub-application without worrying about which parent path it will be mounted on
from README.md
The path passed to mount() is stripped from the URL temporarily until the stack unwinds. This is useful for creating entire apps or middleware that will function correctly regardless of which path segment(s) they should operate on.
Though you are correct that this.redirect("proper") may work, but it won't be optimal if the url you are trying to redirect has a slash character in it. But I guess that will be uncommon.
Still it would be nice if there were a way to define relative urls from the mounted path for redirection just like you get on path that is passed to middleware.
Since this.url is relative, I do not think that redirects should be absolute.
though currently they are. For example, if you do
Then navigating to
example.com/website/not-proper
redirects toexample.com/proper
and notexample.com/website/proper
The text was updated successfully, but these errors were encountered: