This repository was archived by the owner on Apr 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
GatekeeperMiddleware
siemensikkema edited this page Sep 3, 2021
·
1 revision
Middleware used to rate-limit a single route or a group of routes.
public struct GatekeeperMiddleware: Middleware Middleware
Initialize a new middleware for rate-limiting routes, by optionally overriding default configurations.
public init(config: GatekeeperConfig? = nil, keyMaker: GatekeeperKeyMaker? = nil, error: Error? = nil) - config: Override
GatekeeperConfiginstead of using the defaultapp.gatekeeper.config - keyMaker: Override
GatekeeperKeyMakerinstead of using the defaultapp.gatekeeper.keyMaker - config: Override the
Errorthrown when the user is rate-limited instead of using the default error.
public func respond(to request: Request, chainingTo next: Responder) -> EventLoopFuture<Response> Generated at 2021-09-03T08:36:15+0000 using swift-doc 1.0.0-rc.1.