Remove prefixFix, no longer necessary
This commit is contained in:
parent
bea56b6a1e
commit
6eeb7e8018
1 changed files with 0 additions and 14 deletions
14
app/app.py
14
app/app.py
|
@ -19,22 +19,8 @@ db = SQLAlchemy(app)
|
|||
|
||||
toolbar = DebugToolbarExtension(app)
|
||||
|
||||
class PrefixFix(object):
|
||||
|
||||
def __init__(self, app, script_name):
|
||||
self.app = app
|
||||
self.script_name = script_name
|
||||
|
||||
def __call__(self, environ, start_response):
|
||||
path = environ.get('SCRIPT_NAME', '') + environ.get('PATH_INFO', '')
|
||||
environ['SCRIPT_NAME'] = self.script_name
|
||||
environ['PATH_INFO'] = path[len(self.script_name):]
|
||||
return self.app(environ, start_response)
|
||||
|
||||
|
||||
if not app.debug:
|
||||
app.wsgi_app = PrefixFix(app.wsgi_app, '/haldis')
|
||||
|
||||
timedFileHandler = TimedRotatingFileHandler(app.config['LOGFILE'], when='midnight', backupCount=100)
|
||||
timedFileHandler.setLevel(logging.DEBUG)
|
||||
|
||||
|
|
Loading…
Reference in a new issue