From d835e320637c3029b42ab3bb8468383c3b051647 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 2 Nov 2014 23:50:47 +0800 Subject: [PATCH] Removed requirement for http login for API when an API key is provided --- CHANGES.md | 1 + sickbeard/webserve.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 10ccb41f..efa69a69 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -35,6 +35,7 @@ * Fix proxy_indexers setting not loading from config file * Add subtitle information to the cmd show and cmd shows api output * Added network logo for SVT +* Removed requirement for http login for API when an API key is provided [develop changelog] * Improve display of progress bars in the Downloads columns of the show list page diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 45f8cd03..23525101 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -95,9 +95,11 @@ def authenticated(handler_class): try: if not (sickbeard.WEB_USERNAME and sickbeard.WEB_PASSWORD): return True - elif (handler.request.uri.startswith('/api') and '/api/builder' not in handler.request.uri): + elif (handler.request.uri.startswith(sickbeard.WEB_ROOT + '/api') and + '/api/builder' not in handler.request.uri): return True - elif (handler.request.uri.startswith('/calendar') and sickbeard.CALENDAR_UNPROTECTED): + elif (handler.request.uri.startswith(sickbeard.WEB_ROOT + '/calendar') and + sickbeard.CALENDAR_UNPROTECTED): return True auth_hdr = handler.request.headers.get('Authorization')