import os
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(ROOT))
from backend.app import create_application
app = create_application(ROOT / 'private', ROOT / 'public_html', public_url='https://wedding-ekaterina-rustam.ru')
def application(environ, start_response):
    # Sprinthost terminates HTTPS at its nginx front end.
    if environ.get('HTTP_X_FORWARDED_PROTO') == 'https':
        environ = dict(environ, HTTPS='on', **{'wsgi.url_scheme': 'https'})
    return app(environ, start_response)
