{"action":"created","issue":{"url":"https://api.github.com/repos/helmetjs/helmet/issues/88","labels_url":"https://api.github.com/repos/helmetjs/helmet/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/helmetjs/helmet/issues/88/comments","events_url":"https://api.github.com/repos/helmetjs/helmet/issues/88/events","html_url":"https://github.com/helmetjs/helmet/issues/88","id":53233619,"number":88,"title":"Weird AngularJS CSP code","user":{"login":"binarykitchen","id":177641,"avatar_url":"https://avatars.githubusercontent.com/u/177641?v=3","gravatar_id":"","url":"https://api.github.com/users/binarykitchen","html_url":"https://github.com/binarykitchen","followers_url":"https://api.github.com/users/binarykitchen/followers","following_url":"https://api.github.com/users/binarykitchen/following{/other_user}","gists_url":"https://api.github.com/users/binarykitchen/gists{/gist_id}","starred_url":"https://api.github.com/users/binarykitchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binarykitchen/subscriptions","organizations_url":"https://api.github.com/users/binarykitchen/orgs","repos_url":"https://api.github.com/users/binarykitchen/repos","events_url":"https://api.github.com/users/binarykitchen/events{/privacy}","received_events_url":"https://api.github.com/users/binarykitchen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-02T01:17:24Z","updated_at":"2015-01-02T20:15:43Z","closed_at":null,"body":"While debugging to find out why the helmet code isn't working properly with AngularJS I opened the console and found this error\r\n\r\n```\r\nContent Security Policy: The page's settings blocked the loading of a resource at self (\"script-src https://localhost:8080 https://*.google-analytics.com\"). bundle-3fe04b60.js:3811\r\n```\r\n\r\nOk, I clicked on `bundle-3fe04b60.js:3811` and spotted these interesting code lines inside the AngularJS framework:\r\n\r\n```js\r\nvar csp = function() {\r\n  if (isDefined(csp.isActive_)) return csp.isActive_;\r\n\r\n  var active = !!(document.querySelector('[ng-csp]') ||\r\n                  document.querySelector('[data-ng-csp]'));\r\n\r\n  if (!active) {\r\n    try {\r\n      /* jshint -W031, -W054 */\r\n      new Function('');\r\n      /* jshint +W031, +W054 */\r\n    } catch (e) {\r\n      active = true;\r\n    }\r\n  }\r\n\r\n  return (csp.isActive_ = active);\r\n};\r\n```\r\n\r\nWhat should I add under `'script-src'` to accept the above?"},"comment":{"url":"https://api.github.com/repos/helmetjs/helmet/issues/comments/68558317","html_url":"https://github.com/helmetjs/helmet/issues/88#issuecomment-68558317","issue_url":"https://api.github.com/repos/helmetjs/helmet/issues/88","id":68558317,"user":{"login":"EvanHahn","id":777712,"avatar_url":"https://avatars.githubusercontent.com/u/777712?v=3","gravatar_id":"","url":"https://api.github.com/users/EvanHahn","html_url":"https://github.com/EvanHahn","followers_url":"https://api.github.com/users/EvanHahn/followers","following_url":"https://api.github.com/users/EvanHahn/following{/other_user}","gists_url":"https://api.github.com/users/EvanHahn/gists{/gist_id}","starred_url":"https://api.github.com/users/EvanHahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvanHahn/subscriptions","organizations_url":"https://api.github.com/users/EvanHahn/orgs","repos_url":"https://api.github.com/users/EvanHahn/repos","events_url":"https://api.github.com/users/EvanHahn/events{/privacy}","received_events_url":"https://api.github.com/users/EvanHahn/received_events","type":"User","site_admin":false},"created_at":"2015-01-02T20:15:43Z","updated_at":"2015-01-02T20:15:43Z","body":"Can you go into the Network tab and see what resource it's trying to load?"}}