diff --git a/package.json b/package.json index 99f0de6..5d68e66 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/Azure/index.ts b/src/Azure/index.ts index 78b4ae2..010ce27 100644 --- a/src/Azure/index.ts +++ b/src/Azure/index.ts @@ -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 = ( @@ -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) {