Ignore:
Timestamp:
Dec 20, 2009, 4:03:12 PM (14 years ago)
Author:
broder
Message:

Fix the unauthenticated web interface.

Separate the separate components of the web app by the authenticated
webapp class at /auth and the unauthenticated app at /unauth.

These are purely internal URLs, but used to allow a single CherryPy?
instance to serve both the authenticated and unauthenticated website.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy/code/main.fcgi

    r2521 r2650  
    3131    else:
    3232        conf_file = os.path.join(base_dir, 'main.conf')
    33     app = cherrypy.tree.mount(InvirtWeb(),
    34         '/',
    35         {'/':      {'tools.staticdir.root': static_dir,
    36                     'tools.invirtwebstate.on': True},
    37         '/static': {'tools.staticdir.on': True,
    38                     'tools.staticdir.dir': static_dir}
    39          })
    40     app.merge(conf_file)
     33
     34    app_config = {
     35        '/': {
     36            'tools.invirtwebstate.on': True,
     37            },
     38        '/static': {
     39            'tools.staticdir.root': static_dir,
     40            'tools.staticdir.on': True,
     41            'tools.staticdir.dir': static_dir,
     42            }
     43        }
     44                   
     45    authApp = cherrypy.tree.mount(InvirtWeb(),
     46                                  '/auth',
     47                                  app_config)
     48    authApp.merge(conf_file)
    4149    unauthApp = cherrypy.tree.mount(InvirtUnauthWeb(),
    4250                                    '/unauth',
    43                                     {'/': {'tools.invirtwebstate.on': True}})
     51                                    app_config)
    4452    unauthApp.merge(conf_file)
    4553    cherrypy.config.update(conf_file)
Note: See TracChangeset for help on using the changeset viewer.