Skip to content

Commit

Permalink
Removing default route
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbyt3r committed May 2, 2024
1 parent 646400e commit 7bcc362
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions sideboard/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,16 @@ def mount(root, script_name='', config=None):
assert script_name not in cherrypy.tree.apps, '{} has already been mounted, probably by another plugin'.format(script_name)
return orig_mount(root, script_name, recursive_coerce(config))

orig_mount = cherrypy.tree.mount
cherrypy.tree.mount = mount
root = Root()
if config['cherrypy']['tools.cpstats.on']:
root.stats = cpstats.StatsPage()
cherrypy.tree.mount(root, '', app_config)

if config['cherrypy']['profiling.on']:
# If profiling is turned on then expose the web UI, otherwise ignore it.
from sideboard.lib import Profiler
cherrypy.tree.mount(Profiler(config['cherrypy']['profiling.path']), '/profiler')

sys.modules.pop('six.moves.winreg', None) # kludgy workaround for CherryPy's autoreloader erroring on winreg for versions which have this
#orig_mount = cherrypy.tree.mount
#cherrypy.tree.mount = mount
#root = Root()
#if config['cherrypy']['tools.cpstats.on']:
# root.stats = cpstats.StatsPage()
#cherrypy.tree.mount(root, '', app_config)

#if config['cherrypy']['profiling.on']:
# # If profiling is turned on then expose the web UI, otherwise ignore it.
# from sideboard.lib import Profiler
# cherrypy.tree.mount(Profiler(config['cherrypy']['profiling.path']), '/profiler')

#sys.modules.pop('six.moves.winreg', None) # kludgy workaround for CherryPy's autoreloader erroring on winreg for versions which have this

0 comments on commit 7bcc362

Please sign in to comment.