Fix app header template rendering in Safari

Add 'connect-src' directive to Content Security Policy to allow
WebSocket connection.
Added additional error handling when Websocket connection
refused.

Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I83cfaa0b314099aea57ee7f2be75a0658462b2a9
diff --git a/webpack.config.js b/webpack.config.js
index be579cb..28576d5 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -136,6 +136,7 @@
       'object-src': '\'none\'',
       'script-src': ['\'self\''],
       'style-src': ['\'self\''],
+      'connect-src': ['\'self\''],
       // 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