nestjs-security-module
Version:
A plug-and-play NestJS security module with CORS, Helmet, rate limiting, audit logging, CSP, XSS sanitization, and more.
20 lines (19 loc) • 671 B
text/typescript
export interface SecurityModuleOptions {
helmet?: boolean;
cors?: boolean | Record<string, any>;
rateLimit?: {
windowMs: number;
max: number;
};
auditLog?: boolean;
csp?: boolean | Record<string, any>; // ✅ CSP eklendi
sanitize?: boolean; // ✅ yeni eklendi
// ✅ Yeni gelişmiş güvenlik başlıkları
referrerPolicy?: boolean | Record<string, any>;
xFrameOptions?: boolean | 'DENY' | 'SAMEORIGIN';
hsts?: boolean | Record<string, any>;
xContentTypeOptions?: boolean;
expectCt?: boolean | Record<string, any>;
permissionsPolicy?: boolean | Record<string, string[]>;
crossOriginEmbedderPolicy?: boolean | Record<string, any>;
}