mirrormanager-rocky/run.py

14 lines
506 B
Python
Raw Permalink Normal View History

2024-08-28 12:51:25 +00:00
from werkzeug.middleware.proxy_fix import ProxyFix
from mirrormanager2.app import create_app
2024-08-30 19:34:13 +00:00
from flask_session import Session
from cachelib.file import FileSystemCache
import os
2024-08-28 12:51:25 +00:00
application = create_app()
2024-08-30 19:34:13 +00:00
application.debug = os.environ.get("MM2_DEBUG", False)
application.config['SESSION_TYPE'] = "cachelib"
application.config['SESSION_CACHELIB'] = FileSystemCache(cache_dir='/tmp/sessions', threshold=500)
Session(application)
2024-08-28 12:51:25 +00:00
application.wsgi_app = ProxyFix(application.wsgi_app, x_proto=1, x_host=1)