Middlewares
Security Middlewares for Nodejs Expressjs applications
Import the NMiddleware
sanitizeInput
filterRequest
filter request for IPs and Domains. if the host or ip is in the filter list, it will returns 403
headerInspection
Middleware for HTTP Header Inspection to validate and filter HTTP headers for anomalies
- Block insecure or malicious headers.
- Add security headers like Strict-Transport-Security (HSTS).
csrfMiddleware
CSRF (Cross-Site Request Forgery) protection middleware that generates and validates tokens for client-side rendered (CSR) applications. It helps prevent unauthorized cross-origin requests by requiring a valid CSRF token in non-GET requests.