From 11b11ad3e4ec385eece51960bb92436fdcdc23f1 Mon Sep 17 00:00:00 2001 From: Ian <52504170+ibacher@users.noreply.github.com> Date: Tue, 21 Feb 2023 14:24:57 -0500 Subject: [PATCH] (feat) Running shell with run:shell shouldn't use the CSP (#613) --- packages/shell/esm-app-shell/webpack.config.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/shell/esm-app-shell/webpack.config.js b/packages/shell/esm-app-shell/webpack.config.js index 62be82f62..48cb04996 100644 --- a/packages/shell/esm-app-shell/webpack.config.js +++ b/packages/shell/esm-app-shell/webpack.config.js @@ -7,7 +7,7 @@ const BundleAnalyzerPlugin = const WebpackPwaManifest = require("webpack-pwa-manifest"); const { InjectManifest } = require("workbox-webpack-plugin"); const { DefinePlugin, container } = require("webpack"); -const { resolve, dirname, basename } = require("path"); +const { resolve } = require("path"); const { readdirSync, statSync } = require("fs"); const { removeTrailingSlash, getTimestamp } = require("./tools/helpers"); const { name, version, dependencies } = require("./package.json"); @@ -16,7 +16,6 @@ const frameworkVersion = require("@openmrs/esm-framework/package.json").version; const timestamp = getTimestamp(); const production = "production"; -const allowedSuffixes = ["-app", "-widgets"]; const { ModuleFederationPlugin } = container; const openmrsAddCookie = process.env.OMRS_ADD_COOKIE; @@ -103,6 +102,10 @@ module.exports = (env, argv = {}) => { proxyReq.setHeader("cookie", newCookie); } }, + onProxyRes(proxyRes) { + proxyRes.headers && + delete proxyRes.headers["content-security-policy"]; + }, }, ], },