From 355a76845eec7873a8fdd7ce0b29ee5714f94361 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 16 Nov 2023 15:27:15 +0000 Subject: [PATCH] headers --- apps/node/src/routes/proxy.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/node/src/routes/proxy.ts b/apps/node/src/routes/proxy.ts index a46426f..8cc922b 100644 --- a/apps/node/src/routes/proxy.ts +++ b/apps/node/src/routes/proxy.ts @@ -65,6 +65,10 @@ export default class ProxyRoute extends Route { headers["x-proxy-node"] = process.env.NODE_ID; headers["x-proxy-response-time"] = Date.now() - before + "ms"; + // Add CORS headers + headers["access-control-allow-origin"] = "*"; + headers["access-control-allow-methods"] = "*"; + // Return the JSON response res.status(response.status).set(headers).json(data); } catch (ex) {