mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 03:22:22 -05:00
Merge remote-tracking branch 'origin/dev'
This commit is contained in:
commit
76244e1545
@ -86,7 +86,7 @@ from tornado.ioloop import IOLoop
|
|||||||
|
|
||||||
# def _handle_reverse_proxy():
|
# def _handle_reverse_proxy():
|
||||||
# if sickbeard.HANDLE_REVERSE_PROXY:
|
# if sickbeard.HANDLE_REVERSE_PROXY:
|
||||||
# cherrypy.lib.cptools.proxy()
|
# cherrypy.lib.cptools.proxy()
|
||||||
|
|
||||||
|
|
||||||
# cherrypy.tools.handle_reverse_proxy = cherrypy.Tool('before_handler', _handle_reverse_proxy)
|
# cherrypy.tools.handle_reverse_proxy = cherrypy.Tool('before_handler', _handle_reverse_proxy)
|
||||||
@ -105,6 +105,9 @@ def authenticated(handler_class):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
if not (sickbeard.WEB_USERNAME and sickbeard.WEB_PASSWORD):
|
||||||
|
return True
|
||||||
|
|
||||||
auth_hdr = handler.request.headers.get('Authorization')
|
auth_hdr = handler.request.headers.get('Authorization')
|
||||||
|
|
||||||
if auth_hdr == None:
|
if auth_hdr == None:
|
||||||
@ -136,6 +139,7 @@ class RedirectHandler(RequestHandler):
|
|||||||
def get(self, path, **kwargs):
|
def get(self, path, **kwargs):
|
||||||
self.redirect(path, permanent=True)
|
self.redirect(path, permanent=True)
|
||||||
|
|
||||||
|
|
||||||
@authenticated
|
@authenticated
|
||||||
class IndexHandler(RedirectHandler):
|
class IndexHandler(RedirectHandler):
|
||||||
def __init__(self, application, request, **kwargs):
|
def __init__(self, application, request, **kwargs):
|
||||||
@ -450,6 +454,7 @@ class IndexHandler(RedirectHandler):
|
|||||||
|
|
||||||
browser = WebFileBrowser
|
browser = WebFileBrowser
|
||||||
|
|
||||||
|
|
||||||
class PageTemplate(Template):
|
class PageTemplate(Template):
|
||||||
def __init__(self, *args, **KWs):
|
def __init__(self, *args, **KWs):
|
||||||
KWs['file'] = os.path.join(sickbeard.PROG_DIR, "gui/" + sickbeard.GUI_NAME + "/interfaces/default/",
|
KWs['file'] = os.path.join(sickbeard.PROG_DIR, "gui/" + sickbeard.GUI_NAME + "/interfaces/default/",
|
||||||
|
Loading…
Reference in New Issue
Block a user