ApiKey Authentication cleanup

This commit is contained in:
Mark McDowall 2013-09-20 15:19:48 -07:00
parent 57fdbe6e08
commit de607e207b
8 changed files with 48 additions and 45 deletions

View file

@ -21,11 +21,8 @@ define(function () {
delete xhr.data;
}
if (xhr) {
if (!xhr.headers) {
xhr.headers = {};
}
xhr.headers["ApiKey"] = window.NzbDrone.ApiKey;
xhr.headers = xhr.headers || {};
xhr.headers['Authorization'] = window.NzbDrone.ApiKey;
}
return original.apply(this, arguments);