Felix
04/14/2019, 9:18 PMroute("/foo", HttpMethod.Get) {
install(ExampleFeature)
handle {...}
}
However the feature appears to run for all routes.bdawg.io
04/14/2019, 9:52 PMRoute.intercept
stages specific to a route, but Application.install
will always be scoped to the entire applicationorangy
ExampleFeature
is defined for an Application
, you can’t install it into a Route
. Unfortunately, we didn’t find a way to issue an error or a warning, when this happens. DslMarker is not powerful enough in this case.orangy
Routes
, a feature should be implemented for ApplicationCallPipeline
Felix
04/15/2019, 9:55 PMApplicationFeature<Application, ...>
and not ApplicationFeature<ApplicationCallPipeline, ...>
. By switching to the last one I get the expected behaviour: the feature interceptor only runs if the request goes to the route where it was installed.Felix
04/15/2019, 9:58 PMApplicationFeature<Application, ...>
, there was no error during install and the interceptor ran for all requests, which was surprising.orangy
DslMarker
mechanics in the language, but unfortunately it is not enough in this case