corrections für https behind webproxy
This commit is contained in:
1 parent
574e3cb6c4
commit
6f0d0a952d
2 files changed
+14
-7
No files matched your search
@@ -39,6 +39,7 @@ from utils.cli import register_cli_commands
|
||||
from utils.middleware import setup_dev_mode_middleware, get_current_user, get_current_tenant
|
||||
from utils.helpers import get_request_context
|
||||
|
||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||
|
||||
# Initialize extensions globally (will be bound to app in create_app)
|
||||
migrate = Migrate()
|
||||
@@ -66,6 +67,12 @@ def create_app(config_class: Optional[type] = None) -> Flask:
|
||||
app = Flask(__name__)
|
||||
app.config.from_object(config_class or get_config_class())
|
||||
|
||||
|
||||
# Vertraue 1 Reverse Proxy (NPM) für X-Forwarded-For, Proto, Host, Port
|
||||
app.wsgi_app = ProxyFix(
|
||||
app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_port=1, x_prefix=1
|
||||
)
|
||||
|
||||
# Set up logging
|
||||
setup_logging(app)
|
||||
|
||||
|
||||
Reference in new issue
Block a user