mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-21 20:18:06 +02:00
[pitboss] phase 21: Track M.3 — ScheduledJob + GraphQLResolver + WebSocket + Middleware + Migration
This commit is contained in:
parent
00b0fbaea9
commit
f9bd51c024
84 changed files with 5898 additions and 40 deletions
11
tests/dynamic_fixtures/middleware/express/benign.js
Normal file
11
tests/dynamic_fixtures/middleware/express/benign.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// 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 };
|
||||
Loading…
Add table
Add a link
Reference in a new issue