spandx v3.0.2 – Release Summary
Bug Fixes
ESI: safe handling of missing Accept header (#362)
- Uses optional chaining (
?.) when readingreq.headers.acceptbefore applying ESI processing - Avoids crashes when the
Acceptheader is missing or undefined (e.g. some clients or tools) - ESI is now applied only when the request clearly accepts HTML (
text/htmlor*/*)
Impact
- Requests without an
Acceptheader no longer trigger errors when ESI is enabled - Improves compatibility with tools like cURL and custom clients that omit headers
Upgrade
yarn add spandx@3.0.2
or
npm install spandx@3.0.2