From 08f376f2ea3d3bb384f10e3c01f7d48ed21ce351 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 15 Oct 2013 15:00:22 -0700 Subject: fix(csp): fix csp auto-detection and stylesheet injection When we refactored , we broke the csp mode because the previous implementation relied on the fact that it was ok to lazy initialize the .csp property, this is not the case any more. Besides, we need to know about csp mode during bootstrap and avoid injecting the stylesheet when csp is active, so I refactored the code to fix both issues. PR #4411 will follow up on this commit and add more improvements. Closes #917 Closes #2963 Closes #4394 Closes #4444 BREAKING CHANGE: triggering ngCsp directive via `ng:csp` attribute is not supported any more. Please use data-ng-csp instead. --- src/ng/sniffer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ng/sniffer.js') diff --git a/src/ng/sniffer.js b/src/ng/sniffer.js index 7f26e312..9a7447cb 100644 --- a/src/ng/sniffer.js +++ b/src/ng/sniffer.js @@ -76,7 +76,7 @@ function $SnifferProvider() { return eventSupport[event]; }, - csp: document.securityPolicy ? document.securityPolicy.isActive : false, + csp: csp(), vendorPrefix: vendorPrefix, transitions : transitions, animations : animations -- cgit v1.2.3