From 7ac77ecfcc9c29cb748b99e795aae670768f72db Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 10 Oct 2013 08:34:30 -0700 Subject: [PATCH] Send auth header with ajax requests --- src/UI/Mixins/jquery.ajax.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/UI/Mixins/jquery.ajax.js b/src/UI/Mixins/jquery.ajax.js index dfb239819..11ed3dfc0 100644 --- a/src/UI/Mixins/jquery.ajax.js +++ b/src/UI/Mixins/jquery.ajax.js @@ -22,6 +22,10 @@ define( delete xhr.data; } +s if (xhr) { + xhr.headers = xhr.headers || {}; + xhr.headers.Authorization = window.NzbDrone.ApiKey; + } return original.apply(this, arguments); };