MCPcopy Create free account
hub / github.com/EvoMap/evolver / resolveMaxBodyBytes

Function resolveMaxBodyBytes

src/proxy/server/http.js:24–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22// truly needs bigger bodies.
23const DEFAULT_MAX_BODY_BYTES = 1 * 1024 * 1024;
24function resolveMaxBodyBytes() {
25 const raw = Number(process.env.EVOMAP_PROXY_MAX_BODY_BYTES);
26 if (Number.isFinite(raw) && raw > 0) return Math.floor(raw);
27 return DEFAULT_MAX_BODY_BYTES;
28}
29
30function parseBody(req, opts) {
31 const maxBytes = (opts && Number.isFinite(opts.maxBytes) && opts.maxBytes > 0)

Callers 1

parseBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected