diff --git a/src/handlers/clientErrorHandler.js b/src/handlers/clientErrorHandler.js index ff7e5ca..a3d8f90 100644 --- a/src/handlers/clientErrorHandler.js +++ b/src/handlers/clientErrorHandler.js @@ -15,7 +15,7 @@ function clientErrorHandler(err, socket) { generateServerString(config.exposeServerVersion); // getCustomHeaders() in SVR.JS 3.x - config.getCustomHeaders = () => deepClone(config.customHeaders); + config.getCustomHeaders = () => Object.assign({}, config.customHeaders); // Prevent multiple error handlers from one request if (socket.__assigned__) { diff --git a/src/handlers/requestHandler.js b/src/handlers/requestHandler.js index ffef689..4dca787 100644 --- a/src/handlers/requestHandler.js +++ b/src/handlers/requestHandler.js @@ -40,7 +40,7 @@ function requestHandler(req, res) { // getCustomHeaders() in SVR.JS 3.x config.getCustomHeaders = () => { - let ph = deepClone(config.customHeaders); + let ph = Object.assign({}, config.customHeaders); if (config.customHeadersVHost) { let vhostP = null; config.customHeadersVHost.every((vhost) => {