Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #13501 from brave/fix/13499
Browse files Browse the repository at this point in the history
Allow 'self' CSP connect-src by default
  • Loading branch information
bsclifton committed Mar 19, 2018
1 parent 27f76a7 commit 33c3e84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,16 @@ 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'
}

if (process.env.NODE_ENV === 'development') {
// 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(' ')
Expand Down

0 comments on commit 33c3e84

Please sign in to comment.