I have my configuration options in deeply frozen object, so I do not accidentaly modify them and use new ones somewhere else. When setting trust proxy from that config object, proxy-addr tries to modify it.
Versions I have are express@4.15.3 and proxy-addr@1.1.4. The fix might be to .slice() it first:
var trust = trustArg.slice();
Relevant stacktrace frames:
<project>/node_modules/proxy-addr/index.js:106
trust.splice.apply(trust, [i, 1].concat(val));
^
TypeError: Cannot add/remove sealed array elements
at Array.splice (<anonymous>)
at Function.compile (<project>/node_modules/proxy-addr/index.js:106:18)
at exports.compileTrust (<project>/node_modules/express/lib/utils.js:250:20)
at Function.set (<project>/node_modules/express/lib/application.js:372:34)
< … omitted … >
I have my configuration options in deeply frozen object, so I do not accidentaly modify them and use new ones somewhere else. When setting
trust proxyfrom that config object,proxy-addrtries to modify it.Versions I have are
express@4.15.3andproxy-addr@1.1.4. The fix might be to.slice()it first:Relevant stacktrace frames: