Jul 10 - Update codes to catch up with the single tenant project

This commit is contained in:
2026-07-10 12:29:44 -04:00
parent faab9fd008
commit e41998b561
12 changed files with 375 additions and 13 deletions
+6
View File
@@ -32,6 +32,12 @@ def create_app(config_name='default'):
app = Flask(__name__)
app.config.from_object(config[config_name])
# Unwrap X-Forwarded-For / X-Forwarded-Proto set by Nginx so Flask sees
# the real client IP (needed for rate limiting and fail2ban logging) and
# the real scheme (needed for HTTPS URL generation in emails).
from werkzeug.middleware.proxy_fix import ProxyFix
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1)
db.init_app(app)
login_manager.init_app(app)
migrate.init_app(app, db)