Skip to content

Commit

Permalink
BUG: Azure missing remote headers, (partial solution)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronan LE MEILLAT committed Nov 14, 2022
1 parent 3669433 commit ded685d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sctg/nocors",
"version": "0.9.12",
"version": "0.9.13",
"description": "Minimalist noCors proxy for servless app",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
7 changes: 2 additions & 5 deletions src/Azure/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ const remoteRequest = async (
http2: true,
throwHttpErrors: false,
};
const res = await got(url, options);
return res;
return got(url, options);
};

export type ProxyAzureFunction = (
Expand Down Expand Up @@ -102,9 +101,7 @@ export const proxyAzureRequest: ProxyAzureFunction = async function (
return {
status: res.statusCode,
body: res.body,
headers: {
...corsHeaders,
},
headers: {...corsHeaders,...{'content-type':((res as any).headers)['content-type']}},
};
}
} catch (error: any) {
Expand Down

0 comments on commit ded685d

Please sign in to comment.