mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Fix "too many redirects" or "no CSS/JS content" delivered.
Init # Main Handler last for Tornado.
This commit is contained in:
parent
e75a5d7c34
commit
85a1656dd3
2 changed files with 29 additions and 28 deletions
|
@ -44,6 +44,7 @@
|
|||
|
||||
[develop changelog]
|
||||
|
||||
* Fix "too many redirects" or "no CSS/JS content" delivered
|
||||
|
||||
|
||||
### 0.12.5 (2017-01-16 16:22:00 UTC)
|
||||
|
|
|
@ -61,34 +61,6 @@ class WebServer(threading.Thread):
|
|||
cookie_secret=sickbeard.COOKIE_SECRET,
|
||||
login_url='%s/login/' % self.options['web_root'])
|
||||
|
||||
# Main Handler
|
||||
self.app.add_handlers('.*$', [
|
||||
(r'%s/api/builder(/?)(.*)' % self.options['web_root'], webserve.ApiBuilder),
|
||||
(r'%s/api(/?.*)' % self.options['web_root'], webapi.Api),
|
||||
(r'%s/imagecache(/?.*)' % self.options['web_root'], webserve.CachedImages),
|
||||
(r'%s/cache(/?.*)' % self.options['web_root'], webserve.Cache),
|
||||
(r'%s/config/general(/?.*)' % self.options['web_root'], webserve.ConfigGeneral),
|
||||
(r'%s/config/search(/?.*)' % self.options['web_root'], webserve.ConfigSearch),
|
||||
(r'%s/config/providers(/?.*)' % self.options['web_root'], webserve.ConfigProviders),
|
||||
(r'%s/config/subtitles(/?.*)' % self.options['web_root'], webserve.ConfigSubtitles),
|
||||
(r'%s/config/postProcessing(/?.*)' % self.options['web_root'], webserve.ConfigPostProcessing),
|
||||
(r'%s/config/notifications(/?.*)' % self.options['web_root'], webserve.ConfigNotifications),
|
||||
(r'%s/config/anime(/?.*)' % self.options['web_root'], webserve.ConfigAnime),
|
||||
(r'%s/config(/?.*)' % self.options['web_root'], webserve.Config),
|
||||
(r'%s/errorlogs(/?.*)' % self.options['web_root'], webserve.ErrorLogs),
|
||||
(r'%s/history(/?.*)' % self.options['web_root'], webserve.History),
|
||||
(r'%s/home/is_alive(/?.*)' % self.options['web_root'], webserve.IsAliveHandler),
|
||||
(r'%s/home/addShows(/?.*)' % self.options['web_root'], webserve.NewHomeAddShows),
|
||||
(r'%s/home/postprocess(/?.*)' % self.options['web_root'], webserve.HomePostProcess),
|
||||
(r'%s/home(/?.*)' % self.options['web_root'], webserve.Home),
|
||||
(r'%s/manage/manageSearches(/?.*)' % self.options['web_root'], webserve.ManageSearches),
|
||||
(r'%s/manage/showProcesses(/?.*)' % self.options['web_root'], webserve.showProcesses),
|
||||
(r'%s/manage/(/?.*)' % self.options['web_root'], webserve.Manage),
|
||||
(r'%s/ui(/?.*)' % self.options['web_root'], webserve.UI),
|
||||
(r'%s/browser(/?.*)' % self.options['web_root'], webserve.WebFileBrowser),
|
||||
(r'%s(/?.*)' % self.options['web_root'], webserve.MainHandler),
|
||||
])
|
||||
|
||||
# webui login/logout handlers
|
||||
self.app.add_handlers('.*$', [
|
||||
(r'%s/login(/?)' % self.options['web_root'], webserve.LoginHandler),
|
||||
|
@ -123,6 +95,34 @@ class WebServer(threading.Thread):
|
|||
{'path': os.path.join(self.options['data_root'], 'js')}),
|
||||
])
|
||||
|
||||
# Main Handler
|
||||
self.app.add_handlers('.*$', [
|
||||
(r'%s/api/builder(/?)(.*)' % self.options['web_root'], webserve.ApiBuilder),
|
||||
(r'%s/api(/?.*)' % self.options['web_root'], webapi.Api),
|
||||
(r'%s/imagecache(/?.*)' % self.options['web_root'], webserve.CachedImages),
|
||||
(r'%s/cache(/?.*)' % self.options['web_root'], webserve.Cache),
|
||||
(r'%s/config/general(/?.*)' % self.options['web_root'], webserve.ConfigGeneral),
|
||||
(r'%s/config/search(/?.*)' % self.options['web_root'], webserve.ConfigSearch),
|
||||
(r'%s/config/providers(/?.*)' % self.options['web_root'], webserve.ConfigProviders),
|
||||
(r'%s/config/subtitles(/?.*)' % self.options['web_root'], webserve.ConfigSubtitles),
|
||||
(r'%s/config/postProcessing(/?.*)' % self.options['web_root'], webserve.ConfigPostProcessing),
|
||||
(r'%s/config/notifications(/?.*)' % self.options['web_root'], webserve.ConfigNotifications),
|
||||
(r'%s/config/anime(/?.*)' % self.options['web_root'], webserve.ConfigAnime),
|
||||
(r'%s/config(/?.*)' % self.options['web_root'], webserve.Config),
|
||||
(r'%s/errorlogs(/?.*)' % self.options['web_root'], webserve.ErrorLogs),
|
||||
(r'%s/history(/?.*)' % self.options['web_root'], webserve.History),
|
||||
(r'%s/home/is_alive(/?.*)' % self.options['web_root'], webserve.IsAliveHandler),
|
||||
(r'%s/home/addShows(/?.*)' % self.options['web_root'], webserve.NewHomeAddShows),
|
||||
(r'%s/home/postprocess(/?.*)' % self.options['web_root'], webserve.HomePostProcess),
|
||||
(r'%s/home(/?.*)' % self.options['web_root'], webserve.Home),
|
||||
(r'%s/manage/manageSearches(/?.*)' % self.options['web_root'], webserve.ManageSearches),
|
||||
(r'%s/manage/showProcesses(/?.*)' % self.options['web_root'], webserve.showProcesses),
|
||||
(r'%s/manage/(/?.*)' % self.options['web_root'], webserve.Manage),
|
||||
(r'%s/ui(/?.*)' % self.options['web_root'], webserve.UI),
|
||||
(r'%s/browser(/?.*)' % self.options['web_root'], webserve.WebFileBrowser),
|
||||
(r'%s(/?.*)' % self.options['web_root'], webserve.MainHandler),
|
||||
])
|
||||
|
||||
def run(self):
|
||||
protocol, ssl_options = (('http', None),
|
||||
('https', {'certfile': self.https_cert, 'keyfile': self.https_key}))[self.enable_https]
|
||||
|
|
Loading…
Reference in a new issue