"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createMiddlewares = void 0;
const request_id_middleware_1 = require("../../interface/middleware/request-id.middleware");
const sanitization_middleware_1 = require("../../interface/middleware/sanitization.middleware");
const audit_logger_middleware_1 = require("../../interface/middleware/audit-logger.middleware");
const security_middleware_1 = require("../../interface/middleware/security.middleware");
const STRICT_WINDOW_MS = 60 * 1000; // 1 minute
const STRICT_MAX = 20; // 20 requests per minute
const createMiddlewares = (logger, redis) => {
    return {
        requestId: request_id_middleware_1.requestIdMiddleware,
        sanitization: sanitization_middleware_1.sanitizationMiddleware,
        auditLogger: (0, audit_logger_middleware_1.auditLoggerMiddleware)(logger),
        strictRateLimiter: (0, security_middleware_1.createStrictRateLimiter)(STRICT_WINDOW_MS, STRICT_MAX, redis),
    };
};
exports.createMiddlewares = createMiddlewares;
//# sourceMappingURL=middleware.factory.js.map