diff options
| author | Peter Bacon Darwin | 2014-02-16 22:02:31 +0000 |
|---|---|---|
| committer | Peter Bacon Darwin | 2014-02-16 22:02:41 +0000 |
| commit | 33e1bdc543bcb7875dcc004d487333393670ed2d (patch) | |
| tree | 7ff1f564ab486f049b7e9e5ad946a6a88bb651b6 /docs/content/error/$sce/insecurl.ngdoc | |
| parent | 49f90e559ed412402ad7444bc2db2bc1c182ddf5 (diff) | |
| download | angular.js-33e1bdc543bcb7875dcc004d487333393670ed2d.tar.bz2 | |
chore(errors): rename folders to match namespaces
Diffstat (limited to 'docs/content/error/$sce/insecurl.ngdoc')
| -rw-r--r-- | docs/content/error/$sce/insecurl.ngdoc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/content/error/$sce/insecurl.ngdoc b/docs/content/error/$sce/insecurl.ngdoc new file mode 100644 index 00000000..67bbb2b6 --- /dev/null +++ b/docs/content/error/$sce/insecurl.ngdoc @@ -0,0 +1,26 @@ +@ngdoc error +@name $sce:insecurl +@fullName Processing of a Resource from Untrusted Source Blocked +@description + +AngularJS' {@link ng.$sce Strict Contextual Escaping (SCE)} mode (enabled by default) has blocked loading a resource from an insecure URL. + +Typically, this would occur if you're attempting to load an Angular template from an untrusted source. +It's also possible that a custom directive threw this error for a similar reason. + +Angular only loads templates from trusted URLs (by calling {@link ng.$sce#methods_getTrustedResourceUrl $sce.getTrustedResourceUrl} on the template URL). + +By default, only URLs that belong to the same origin are trusted. These are urls with the same domain and protocol as the application document. + +The {@link ng.directive:ngInclude ngInclude} directive and {@link guide/directive directives} that specify a `templateUrl` require a trusted resource URL. + +To load templates from other domains and/or protocols, either adjust the {@link +api/ng.$sceDelegateProvider#methods_resourceUrlWhitelist whitelist}/ {@link +api/ng.$sceDelegateProvider#methods_resourceUrlBlacklist blacklist} or wrap the URL with a call to {@link +api/ng.$sce#methods_trustAsResourceUrl $sce.trustAsResourceUrl}. + +**Note**: The browser's [Same Origin +Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest) and +[Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/) policy apply +that may further restrict whether the template is successfully loaded. (e.g. neither cross-domain +requests won't work on all browsers nor `file://` requests on some browsers) |
