filter

fun filter(filterFunction: suspend (ServerRequest, suspend (ServerRequest) -> ServerResponse) -> ServerResponse)

Filters all routes created by this router with the given filter function. Filter functions are typically used to address cross-cutting concerns, such as logging, security, etc.

Since

5.2

Parameters

filterFunction

the function to filter all routes built by this router