Skip to content
Permalink
Browse files

feat(rest): NMS-9783: add X-Requested-With header to requests

  • Loading branch information...
RangerRick committed Mar 22, 2018
1 parent a10c13b commit e80372616c08422e5f6c805c12de31366af455b3
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/rest/AbstractHTTP.ts
@@ -144,6 +144,9 @@ export abstract class AbstractHTTP implements IOnmsHTTP {
ret.auth = Object.assign(ret.auth, server.auth);
}
ret = Object.assign(ret, options);
if (!ret.headers.hasOwnProperty('X-Requested-With')) {
ret.headers['X-Requested-With'] = 'XMLHttpRequest';
}
return ret;
}

0 comments on commit e803726

Please sign in to comment.
You can’t perform that action at this time.