Skip to content

Rate Limiter windows #351

@gyuray-dev

Description

@gyuray-dev

Firstly, I find your project to be really useful. Thank you very much.

In the rate limiter, I'm wondering why the number 15 * 60 is multiplied by the ms parameter. It actually seems to enlarge the window size, resulting in the normal requests being blocked.


src/common/middleware/rateLimiter.ts

import type { Request } from "express";
import { rateLimit } from "express-rate-limit";

import { env } from "@/common/utils/envConfig";

const rateLimiter = rateLimit({
  ...
  windowMs: 15 * 60 * env.COMMON_RATE_LIMIT_WINDOW_MS,
  ...
});

export default rateLimiter;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions