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;
|
||||
}
|
||||
});
|
||||
if (vhostP && vhostP.headers) {
|
||||
const phNu = Object.assign({}, vhostP.headers);
|
||||
Object.keys(phNu).forEach((phNuK) => {
|
||||
ph[phNuK] = phNu[phNuK];
|
||||
});
|
||||
}
|
||||
if (vhostP && vhostP.headers) ph = {...ph, ...vhostP.headers};
|
||||
}
|
||||
Object.keys(ph).forEach((phk) => {
|
||||
if (typeof ph[phk] == "string")
|
||||
|
|
Loading…
Reference in a new issue