Firstly, thank you for building this SDK -- it's awesome!
Currently, you can call the use method to register middleware on the App class, but you cannot modify the list. For example, in my case I wanted to remove the RequestVerification middleware because we have a proxy in front of our server that already checks the Slack signatures, but I was forced to sub-class App in order to override buildDefaultMiddlewareList to filter out that middleware.
It'd be nice if there was a way to modify the middleware list outside of App's constructor, or perhaps just expose buildDefaultMiddlewareList as a public static method, so you could do something like this:
val middleware = App.buildDefaultMiddlewareList().filter { it !is RequestVerification }
val app = App(appConfig, middleware)
Alternatively, for my particular use case, a configuration flag in AppConfig controlling whether that specific middleware gets included in the list would have done the trick as well.
Cc: @gal-yardeni
Category (place an x in each of the [ ])
Firstly, thank you for building this SDK -- it's awesome!
Currently, you can call the
usemethod to register middleware on theAppclass, but you cannot modify the list. For example, in my case I wanted to remove theRequestVerificationmiddleware because we have a proxy in front of our server that already checks the Slack signatures, but I was forced to sub-classAppin order to overridebuildDefaultMiddlewareListto filter out that middleware.It'd be nice if there was a way to modify the middleware list outside of
App's constructor, or perhaps just exposebuildDefaultMiddlewareListas apublic staticmethod, so you could do something like this:Alternatively, for my particular use case, a configuration flag in
AppConfigcontrolling whether that specific middleware gets included in the list would have done the trick as well.Cc: @gal-yardeni
Category (place an
xin each of the[ ])