Upload proxy - Using Header objects build-in entries function (#6340)

* Using Header objects build-in entries function

* Using const in iteration
This commit is contained in:
Jørgensen 2020-05-25 16:05:12 +02:00 committed by GitHub
parent bdf47753b2
commit 65cc815a18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,9 +27,9 @@ module.exports = {
headers: _.omit(ctx.request.headers, ['origin', 'host', 'authorization']),
});
Object.entries(res.headers.raw()).forEach(([key, value]) => {
for (const [key, value] of res.headers.entries()) {
ctx.set(key, value);
});
}
ctx.status = res.status;
ctx.body = res.body;