mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
ApiKey Authentication cleanup
This commit is contained in:
parent
57fdbe6e08
commit
de607e207b
8 changed files with 48 additions and 45 deletions
|
@ -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);
|
||||
|
|
|
@ -5,7 +5,7 @@ var statusText = $.ajax({
|
|||
url : window.NzbDrone.ApiRoot + '/system/status',
|
||||
async: false,
|
||||
headers: {
|
||||
ApiKey: window.NzbDrone.ApiKey
|
||||
Authorization: window.NzbDrone.ApiKey
|
||||
}
|
||||
}).responseText;
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
</body>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.NzbDrone = {};
|
||||
window.NzbDrone = window.NzbDrone || {};
|
||||
window.NzbDrone.ApiKey = 'API_KEY';
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue