1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Fix api/builder if your using a webroot

This commit is contained in:
John 2014-11-29 23:09:23 +01:00
parent 44ae0c2933
commit d8943d06e0

View File

@ -99,7 +99,7 @@ def authenticated(handler_class):
if not (sickbeard.WEB_USERNAME and sickbeard.WEB_PASSWORD): if not (sickbeard.WEB_USERNAME and sickbeard.WEB_PASSWORD):
return True return True
elif (handler.request.uri.startswith(sickbeard.WEB_ROOT + '/api') and elif (handler.request.uri.startswith(sickbeard.WEB_ROOT + '/api') and
'/api/builder' not in handler.request.uri): sickbeard.WEB_ROOT + '/api/builder' not in handler.request.uri):
return True return True
elif (handler.request.uri.startswith(sickbeard.WEB_ROOT + '/calendar') and elif (handler.request.uri.startswith(sickbeard.WEB_ROOT + '/calendar') and
sickbeard.CALENDAR_UNPROTECTED): sickbeard.CALENDAR_UNPROTECTED):
@ -107,7 +107,7 @@ def authenticated(handler_class):
auth_hdr = handler.request.headers.get('Authorization') auth_hdr = handler.request.headers.get('Authorization')
if auth_hdr == None: if auth_hdr is None:
return _request_basic_auth(handler) return _request_basic_auth(handler)
if not auth_hdr.startswith('Basic '): if not auth_hdr.startswith('Basic '):
return _request_basic_auth(handler) return _request_basic_auth(handler)