From 31287c88995feb4cc6130ad8b0ee2f9534e224c0 Mon Sep 17 00:00:00 2001 From: f0x Date: Tue, 5 Nov 2024 22:35:07 +0100 Subject: [PATCH] dev proxy: strip CSP header --- web/source/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/web/source/index.js b/web/source/index.js index 034916b72..7b36676e2 100644 --- a/web/source/index.js +++ b/web/source/index.js @@ -47,9 +47,13 @@ skulk({ }, servers: { express: { - proxy: "http://127.0.0.1:8081", - assets: "/assets" - } + proxy: { + target: "http://127.0.0.1:8081", + onProxyRes: (proxyRes) => { + // CSP header prevents react-devtools and redux-devtools extensions from working + delete proxyRes.headers['content-security-policy']; + }, + }, }, bundles: { frontend: {