Add 'wss:' to connect-src directive in CSP
This will fix Safari console errors for WebSocket connections.
This fix is dependent on
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/24610
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I54987124037c206773bbc4ee690f854bfae8fa19
diff --git a/webpack.config.js b/webpack.config.js
index 28576d5..71b029e 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -136,7 +136,7 @@
'object-src': '\'none\'',
'script-src': ['\'self\''],
'style-src': ['\'self\''],
- 'connect-src': ['\'self\''],
+ 'connect-src': ['\'self\'', 'wss:'],
// KVM requires image buffers from data: payloads, so allow that in
// img-src
// https://stackoverflow.com/questions/18447970/content-security-policy-data-not-working-for-base64-images-in-chrome-28