wirejs-deploy-amplify-basic 0.0.20-alpha → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -212,11 +212,11 @@ async function proxyRequest(req, res, targetUrl) {
|
|
|
212
212
|
try {
|
|
213
213
|
const response = await fetch(targetUrl, fetchOptions);
|
|
214
214
|
const responseBody = await response.text();
|
|
215
|
-
const responseHeaders = response.headers
|
|
215
|
+
const responseHeaders = response.headers;
|
|
216
216
|
|
|
217
217
|
res.statusCode = response.status;
|
|
218
|
-
|
|
219
|
-
res.setHeader(header, responseHeaders
|
|
218
|
+
[...responseHeaders.keys()].forEach((header) => {
|
|
219
|
+
res.setHeader(header, responseHeaders.get(header));
|
|
220
220
|
});
|
|
221
221
|
|
|
222
222
|
res.end(responseBody);
|