fix: Global middlewares are not used if route prefix doesn't start with a slash ("/") #1298
Labels
status: needs triage
Issues which needs to be reproduced to be verified report.
type: fix
Issues describing a broken feature.
Description
Introducing route prefix scoping for global middlewares created a convention that
config.routePrefix
needs to start with a slash ("/"), otherwise global middlewares will not be applied.Let's assume an application is defined as following:
When doing so, none of the middlewares are executed globally for any possible route.
If the
routePrefix
is having a leading slash, this would work properly:Expected behavior
Values of
routePrefix
are either rejected with an error if they don't start with a slash, or theExpressDriver
normalizes this and adds the slash if needed.Actual behavior
Global middlewares are not used (registered, but
use
is not called) at all.The text was updated successfully, but these errors were encountered: