From 20158b70c9c4174084c0bb1895c3574fa793d250 Mon Sep 17 00:00:00 2001 From: Zak Burke Date: Thu, 22 Aug 2024 11:30:39 -0400 Subject: [PATCH] proxy response: strip access-control-allow-origin header --- lib/run-proxy.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/run-proxy.js b/lib/run-proxy.js index 31e62a1..48827bc 100644 --- a/lib/run-proxy.js +++ b/lib/run-proxy.js @@ -11,6 +11,11 @@ app.use( createProxyMiddleware({ target: OKAPI, changeOrigin: true, + on: { + proxyRes: (proxyRes) => { + delete proxyRes.headers['Access-Control-Allow-Origin']; + }, + }, }), );