chg: [flask] set proxy ProxyFix

This commit is contained in:
terrtia 2025-01-07 14:41:31 +01:00
parent d0f4247c2b
commit 80c7410cb1
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -13,6 +13,7 @@ import logging.config
from flask import Flask, render_template, jsonify, request, Request, Response, session, redirect, url_for
from flask_login import LoginManager, current_user, login_user, logout_user, login_required
from flask_sock import Sock
from werkzeug.middleware.proxy_fix import ProxyFix
sys.path.append(os.environ['AIL_BIN'])
##################################
@ -180,6 +181,9 @@ def list_len(s):
app.jinja_env.filters['list_len'] = list_len
# ========= PROXY ========
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1)
# ========= CACHE CONTROL ========
@app.after_request