diff --git a/app/extensions.js b/app/extensions.js index bf4d1c3a224..60161eee53a 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -198,7 +198,7 @@ let generateBraveManifest = () => { 'style-src': '\'self\' \'unsafe-inline\'', 'font-src': '\'self\' data:', 'img-src': '* data: file://*', - 'connect-src': 'https://www.youtube.com', + 'connect-src': '\'self\' https://www.youtube.com', 'frame-src': '\'self\' https://brave.com' } @@ -206,8 +206,8 @@ let generateBraveManifest = () => { // allow access to webpack dev server resources let devServer = 'localhost:' + process.env.npm_package_config_port cspDirectives['default-src'] = '\'self\' http://' + devServer - cspDirectives['connect-src'] = cspDirectives['connect-src'] + [ - ' \'self\'', + cspDirectives['connect-src'] = [ + cspDirectives['connect-src'], 'http://' + devServer, 'ws://' + devServer ].join(' ')