forked from svrjs/svrjs
Replace the iteration with object spread operator
This commit is contained in:
parent
4506d38eac
commit
47ad7006e9
1 changed files with 1 additions and 6 deletions
|
@ -54,12 +54,7 @@ function requestHandler(req, res) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (vhostP && vhostP.headers) {
|
if (vhostP && vhostP.headers) ph = {...ph, ...vhostP.headers};
|
||||||
const phNu = Object.assign({}, vhostP.headers);
|
|
||||||
Object.keys(phNu).forEach((phNuK) => {
|
|
||||||
ph[phNuK] = phNu[phNuK];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Object.keys(ph).forEach((phk) => {
|
Object.keys(ph).forEach((phk) => {
|
||||||
if (typeof ph[phk] == "string")
|
if (typeof ph[phk] == "string")
|
||||||
|
|
Reference in a new issue