Merge pull request #233 from kokhoor/main

Enables nginx https to proxy SpiffWorkflow Backend running on http
This commit is contained in:
Kevin Burnett 2023-05-01 15:16:25 +00:00 committed by GitHub
commit 0c0e13804a
1 changed files with 3 additions and 0 deletions

View File

@ -7,6 +7,9 @@ from spiffworkflow_backend.services.acceptance_test_fixtures import (
)
app = create_app()
if os.environ.get("SPIFFWORKFLOW_BACKEND_USE_WERKZEUG_MIDDLEWARE_PROXY_FIX") == "true":
from werkzeug.middleware.proxy_fix import ProxyFix
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1)
# this is in here because when we put it in the create_app function,
# it also loaded when we were running migrations, which resulted in a chicken/egg thing.