forked from svrjs/svrjs
Replace deep clone in getCustomHeaders() function with shallow clone
This commit is contained in:
parent
63633d1de1
commit
fb887e4122
2 changed files with 2 additions and 2 deletions
|
@ -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__) {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Reference in a new issue