Module

x/drash/src/modules/middleware/RateLimiter/mod.ts>RateLimiterMiddleware

A microframework for building JavaScript HTTP applications. Runtime-agnostic. Strongly typed.
Latest
class RateLimiterMiddleware
extends Middleware
import { RateLimiterMiddleware } from "https://dotland.deno.dev/x/drash@v3.0.0-beta.2/src/modules/middleware/RateLimiter/mod.ts";

Constructors

new
RateLimiterMiddleware(options?: Options)

Construct the middleware that handles rate limiting requests.

Methods

protected
sendResponse(context: Context)

Send the response in the context object to the caller.

protected
sendToNext(context: PreNextContext)

Send the request to the next handler for a response.

protected
setClientInContext(request: Request)

Set the client in the context object.

protected
throwIfRateLimited(context: PreNextContext)

Check the client to see if it should be rate limited.

ALL(request: Request): Promise<Response>