Reverse Proxy Changes

This commit is contained in:
Tanishq Dubey 2024-11-05 17:16:32 -05:00
parent 905e3c3977
commit b46ec98115

3
app.py
View File

@ -20,11 +20,14 @@ import atexit
from flask_limiter import Limiter
from flask_limiter.util import get_remote_address
import secrets
from werkzeug.middleware.proxy_fix import ProxyFix
app = Flask(__name__)
app.secret_key = os.urandom(24)
config = load_or_create_config()
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_prefix=1)
UPLOAD_FOLDER = config['directories']['upload']
THUMBNAIL_FOLDER = config['directories']['thumbnail']
ALLOWED_EXTENSIONS = {'jpg', 'jpeg', 'png', 'gif'}