Comparing version 1.12.1 to 1.13.0
@@ -37,5 +37,9 @@ 'use strict'; | ||
res.send = body => { | ||
const ctype = res.get('Content-Type'); | ||
if(typeof body === 'string' && !req._esiProcessed) { | ||
esi.process(body, req.esiOptions).then(oldSend); | ||
} | ||
else if(body instanceof Buffer && ctype && ctype.match(/(text\/)|(\/xml)/) && !req._esiProcessed) { | ||
esi.process(body.toString(), req.esiOptions).then(oldSend); | ||
} | ||
else { | ||
@@ -42,0 +46,0 @@ oldSend(body); |
{ | ||
"name": "nodesi", | ||
"version": "1.12.1", | ||
"version": "1.13.0", | ||
"description": "ESI: the good parts in node.js", | ||
@@ -5,0 +5,0 @@ "main": "esi.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20374
313