diff options
Diffstat (limited to 'src/acit/__init__.py')
| -rw-r--r-- | src/acit/__init__.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/acit/__init__.py b/src/acit/__init__.py index ac96935..b41abe5 100644 --- a/src/acit/__init__.py +++ b/src/acit/__init__.py @@ -3,7 +3,7 @@ from os import getenv import cherrypy -from .web import Server +from .web import Server, SecureServer from .imapplugin import ImapPlugin from .db import DBPoolManager @@ -25,11 +25,24 @@ def run(): server=Server(dbpool=db,site=site,imap=imap) + + secureserver=SecureServer(server) + + securepath=getenv("ACIT_SECURE_PATH","/secure/") + if not securepath.startswith('/'): + securepath='/'+securepath + + cherrypy.tree.mount(secureserver,securepath,{ + '/':{ + 'tools.sessions.on':True, + } + }) + cherrypy.quickstart(server,'/',{ 'global':{ 'server.socket_host':'0.0.0.0', 'tools.proxy.on':True if getenv("ACIT_BEHIND_PROXY") else False - } + }, }) |
