     try response.end()
 }
 
-class Limiter: RouterMiddleware {
+public class Limiter: RouterMiddleware {
     let by: By
     let onRateLimited: RouterHandler
     let expire: Int

        ])
    }

    func handle(request: RouterRequest, response: RouterResponse, next: @escaping NextFunc) throws {

        if whitelist(request) {
            return next()

    let skipHeaders: Bool

    // 150 req/hour default
    public init(redis: Redis, by: @escaping By = defaultByFunc, total: Int = 150, expire: Int = 1000 * 60 * 60, onRateLimited: @escaping RouterHandler = defaultOnRateLimited, ignoreErrors: Bool = false, whitelist: @escaping WhiteList = defaultWhitelist, onRedisError: @escaping RouterHandler = defaultOnRedisError, skipHeaders: Bool = false) {
        self.redis = redis
        self.by = by
        self.total = total
