diff options
| author | Rado Kirov | 2012-10-12 12:41:05 -0700 |
|---|---|---|
| committer | Igor Minar | 2012-11-26 23:36:40 +0100 |
| commit | 3a75b1124d062f64093a90b26630938558909e8d (patch) | |
| tree | 83bce3c782b6bd127dfb3df58def57dce329a9d6 /test/ngMock | |
| parent | a32bc40fd75ca46e3581ad7a6e3a24a31df6e266 (diff) | |
| download | angular.js-3a75b1124d062f64093a90b26630938558909e8d.tar.bz2 | |
fix($http): remove 'X-Requested-With' from header defaults
X-Requested-With header is rarely used in practice and by using
it all the time we are triggering preflight checks for crossdomain
requests.
We could try detecting if we are doing CORS requests or not, but
it doesn't look like it's worth the trouble.
BREAKING CHANGE: X-Requested-With header is not set by $http service
any more. If anyone actually uses this header it's quite easy to add
it back via:
```
myAppModule.config(['$httpProvider', function($httpProvider) {
$httpProvider.defaults.headers.common["X-Requested-With"] = 'XMLHttpRequest';
}]);
```
Closes #1004
Diffstat (limited to 'test/ngMock')
0 files changed, 0 insertions, 0 deletions
