nyx/tests/dynamic_fixtures/middleware/express/benign.js
2026-06-05 10:16:30 -05:00

11 lines
325 B
JavaScript

// Phase 21 — Express middleware benign control.
const _NYX_ADAPTER_MARKER = "require('express')";
function audit(req, res, next) {
const body = String(req.body || '');
if (body.length > 1024) return res.end('too large');
if (typeof next === 'function') next();
return 'ok';
}
module.exports = { audit };