Skip to content

Commit

Permalink
chg: [flask] set proxy ProxyFix
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Jan 7, 2025
1 parent d0f4247 commit 80c7410
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions var/www/Flask_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
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'])
##################################
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 80c7410

Please sign in to comment.