header-middleware-next
Version:
A lightweight and flexible middleware utility for managing HTTP headers in Next.js applications. Supports header extraction, transformation, masking, and safe injection for Edge and API routes.
24 lines (22 loc) • 849 B
JavaScript
/**
* Aggregation module exporting an array of header checking functions.
* Each function performs validation and analysis of a specific HTTP header or request aspect,
* enabling a modular and extensible approach to request inspection.
*
* This collection can be easily imported and iterated over to apply all checks to incoming requests,
* facilitating centralized and consistent HTTP request validation.
*/
import checkAjax from './checkAjax.js';
import checkUserAgent from './checkUserAgent.js';
import checkIP from './checkIP.js';
import checkMethod from "./checkMethod.js";
import checkAcceptLanguage from "./checkAcceptLanguage.js";
import checkHeadersLength from "./checkHeadersLength.js";
export default [
checkAjax,
checkUserAgent,
checkIP,
checkMethod,
checkAcceptLanguage,
checkHeadersLength
];