From fab12ff6ea9e9ba229b7911ee622895756447db7 Mon Sep 17 00:00:00 2001 From: Michael Mainguy Date: Tue, 15 Aug 2023 10:46:31 -0500 Subject: [PATCH] More CORS Shenanigans --- netlify/functions/nerdgraph/nerdgraph.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/netlify/functions/nerdgraph/nerdgraph.ts b/netlify/functions/nerdgraph/nerdgraph.ts index d671dc4..a8e6f84 100644 --- a/netlify/functions/nerdgraph/nerdgraph.ts +++ b/netlify/functions/nerdgraph/nerdgraph.ts @@ -12,7 +12,11 @@ export const handler: Handler = async (event: HandlerEvent, context: HandlerCont {headers: {'Api-Key': apiKey, 'Content-Type': 'application/json'}}); const data = await response.data; return { - headers: {'Content-Type': 'application/json'}, + headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': 'https://cameras.immersiveidea.com', + 'Access-Control-Allow-Credentials': 'true' + }, statusCode: 200, body: JSON.stringify(data) }