@@ -388,7 +388,7 @@ function $HttpProvider() {
388388
389389 /**
390390 * @ngdoc property
391- * @name $httpProvider#xsrfWhitelistedOrigins
391+ * @name $httpProvider#xsrfTrustedOrigins
392392 * @description
393393 *
394394 * Array containing URLs whose origins are trusted to receive the XSRF token. See the
@@ -402,7 +402,7 @@ function $HttpProvider() {
402402 * Examples: `http://example.com`, `https://api.example.com:9876`
403403 *
404404 * <div class="alert alert-warning">
405- * It is not possible to whitelist specific URLs/paths. The `path`, `query` and `fragment` parts
405+ * It is not possible to trust specific URLs/paths. The `path`, `query` and `fragment` parts
406406 * of a URL will be ignored. For example, `https://foo.com/path/bar?query=baz#fragment` will be
407407 * treated as `https://foo.com`, meaning that **all** requests to URLs starting with
408408 * `https://foo.com/` will include the XSRF token.
@@ -413,9 +413,9 @@ function $HttpProvider() {
413413 * ```js
414414 * // App served from `https://example.com/`.
415415 * angular.
416- * module('xsrfWhitelistedOriginsExample ', []).
416+ * module('xsrfTrustedOriginsExample ', []).
417417 * config(['$httpProvider', function($httpProvider) {
418- * $httpProvider.xsrfWhitelistedOrigins .push('https://api.example.com');
418+ * $httpProvider.xsrfTrustedOrigins .push('https://api.example.com');
419419 * }]).
420420 * run(['$http', function($http) {
421421 * // The XSRF token will be sent.
@@ -426,7 +426,7 @@ function $HttpProvider() {
426426 * }]);
427427 * ```
428428 */
429- var xsrfWhitelistedOrigins = this . xsrfWhitelistedOrigins = [ ] ;
429+ var xsrfTrustedOrigins = this . xsrfWhitelistedOrigins = this . xsrfTrustedOrigins = [ ] ;
430430
431431 this . $get = [ '$browser' , '$httpBackend' , '$$cookieReader' , '$cacheFactory' , '$rootScope' , '$q' , '$injector' , '$sce' ,
432432 function ( $browser , $httpBackend , $$cookieReader , $cacheFactory , $rootScope , $q , $injector , $sce ) {
@@ -454,7 +454,7 @@ function $HttpProvider() {
454454 /**
455455 * A function to check request URLs against a list of allowed origins.
456456 */
457- var urlIsAllowedOrigin = urlIsAllowedOriginFactory ( xsrfWhitelistedOrigins ) ;
457+ var urlIsAllowedOrigin = urlIsAllowedOriginFactory ( xsrfTrustedOrigins ) ;
458458
459459 /**
460460 * @ngdoc service
@@ -828,16 +828,16 @@ function $HttpProvider() {
828828 * The header will — by default — **not** be set for cross-domain requests. This
829829 * prevents unauthorized servers (e.g. malicious or compromised 3rd-party APIs) from gaining
830830 * access to your users' XSRF tokens and exposing them to Cross Site Request Forgery. If you
831- * want to, you can whitelist additional origins to also receive the XSRF token, by adding them
832- * to {@link ng.$httpProvider#xsrfWhitelistedOrigins xsrfWhitelistedOrigins }. This might be
831+ * want to, you can trust additional origins to also receive the XSRF token, by adding them
832+ * to {@link ng.$httpProvider#xsrfTrustedOrigins xsrfTrustedOrigins }. This might be
833833 * useful, for example, if your application, served from `example.com`, needs to access your API
834834 * at `api.example.com`.
835- * See {@link ng.$httpProvider#xsrfWhitelistedOrigins $httpProvider.xsrfWhitelistedOrigins } for
835+ * See {@link ng.$httpProvider#xsrfTrustedOrigins $httpProvider.xsrfTrustedOrigins } for
836836 * more details.
837837 *
838838 * <div class="alert alert-danger">
839839 * **Warning**<br />
840- * Only whitelist origins that you have control over and make sure you understand the
840+ * Only trusted origins that you have control over and make sure you understand the
841841 * implications of doing so.
842842 * </div>
843843 *
@@ -964,7 +964,7 @@ function $HttpProvider() {
964964<file name="script.js">
965965 angular.module('httpExample', [])
966966 .config(['$sceDelegateProvider', function($sceDelegateProvider) {
967- // We must whitelist the JSONP endpoint that we are using to show that we trust it
967+ // We must add the JSONP endpoint that we are using to the trusted list to show that we trust it
968968 $sceDelegateProvider.trustedResourceUrlList([
969969 'self',
970970 'https://angularjs.org/**'
@@ -1222,7 +1222,7 @@ function $HttpProvider() {
12221222 *
12231223 * Note that, since JSONP requests are sensitive because the response is given full access to the browser,
12241224 * the url must be declared, via {@link $sce} as a trusted resource URL.
1225- * You can trust a URL by adding it to the whitelist via
1225+ * You can trust a URL by adding it to the trusted resource URL list via
12261226 * {@link $sceDelegateProvider#trustedResourceUrlList `$sceDelegateProvider.trustedResourceUrlList`} or
12271227 * by explicitly trusting the URL via {@link $sce#trustAsResourceUrl `$sce.trustAsResourceUrl(url)`}.
12281228 *
0 commit comments