-
Notifications
You must be signed in to change notification settings - Fork 27.5k
fix(csp): fix csp auto-detection and stylesheet injection #4444
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ function $SnifferProvider() { | |
|
||
return eventSupport[event]; | ||
}, | ||
csp: document.securityPolicy ? document.securityPolicy.isActive : false, | ||
csp: csp(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tbosch and I looked at this yesterday. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually the spec says that this is the correct way of doing it: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html However, Chrome and others don't seem to support this yet. I like the change of @IgorMinar as it allows to manually override the autodetection and it is quite simple. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chirayuk securityPolicy is a CSPv1.1 feature that is not in non-canary Chrome yet. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aha. Good to know. Thanks! |
||
vendorPrefix: vendorPrefix, | ||
transitions : transitions, | ||
animations : animations | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we cache this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore that, not a big deal.