RouterPre registers one or more global middlewares that are executed
BEFORE the router processes the request. It is usually used for making
changes to the request properties, for example, adding or removing
a trailing slash or adding segments to a path so it matches a route.
NB! Since the router will not have processed the request yet,
middlewares registered at this level won't have access to any path
related APIs from echo.Context.
RouterPre registers one or more global middlewares that are executed BEFORE the router processes the request. It is usually used for making changes to the request properties, for example, adding or removing a trailing slash or adding segments to a path so it matches a route.
NB! Since the router will not have processed the request yet, middlewares registered at this level won't have access to any path related APIs from echo.Context.
Example:
Note that this method is available only in pb_hooks context.