mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-19 21:34:22 +01:00
rateLimitMiddleware: improve tsdoc comment
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import { MiddlewareHandler } from '@hono/hono';
|
||||
import { rateLimiter } from 'hono-rate-limiter';
|
||||
|
||||
/** Rate limit middleware for Hono. */
|
||||
/**
|
||||
* Rate limit middleware for Hono, based on [`hono-rate-limiter`](https://github.com/rhinobase/hono-rate-limiter).
|
||||
*/
|
||||
export function rateLimitMiddleware(limit: number, windowMs: number): MiddlewareHandler {
|
||||
// @ts-ignore Mismatched hono versions.
|
||||
return rateLimiter({
|
||||
limit,
|
||||
windowMs,
|
||||
|
||||
Reference in New Issue
Block a user