router icon indicating copy to clipboard operation
router copied to clipboard

Pass base URL to subrouter

Open nounder opened this issue 11 months ago • 0 comments

Currently it is not possible to reliably resolve full URL from a subrouter as subrouter ctx.match is matched from a partial path provided in WorkerRouter.use. The only way to resolve full URL within subrouters is to make assumptions about parent routes which goes against idea of composability.

It would be really useful to pass parent match to subrouters making it possible to reliably resolve full URL within a subrouter.

nounder avatar Mar 03 '24 12:03 nounder