Build-phase middleware: registers the endpoint, with its path taken from configuration.
A middleware rather than a static route on the blueprint, because the path is configurable and a
blueprint constant is evaluated before the application has said anything. Reading configuration is
only safe once everything has been collected, which is why this runs after next.
The route is added to stone.router.definitions, the array the router scans, so nothing here
depends on the router package.
stone.mcp.route is spread onto the definition, so the endpoint is protected the way any other
route is: auth, authz, rateLimit, middleware. This module invents no options of its own
for that, because a second permission model is a second thing to keep in step with the first.
Build-phase middleware: registers the endpoint, with its path taken from configuration.
A middleware rather than a static route on the blueprint, because the path is configurable and a blueprint constant is evaluated before the application has said anything. Reading configuration is only safe once everything has been collected, which is why this runs after
next.The route is added to
stone.router.definitions, the array the router scans, so nothing here depends on the router package.stone.mcp.routeis spread onto the definition, so the endpoint is protected the way any other route is:auth,authz,rateLimit,middleware. This module invents no options of its own for that, because a second permission model is a second thing to keep in step with the first.