feat: add reverse proxy support with HTTPS configuration

This commit is contained in:
Christian Krakau-Louis
2025-06-09 15:01:24 +02:00
parent bc4055ded5
commit d71dda4828
7 changed files with 37 additions and 17 deletions
+4
View File
@@ -111,6 +111,10 @@ def create_app(config=None):
# Configure the app
app.config.from_object(Config)
# Set preferred URL scheme for reverse proxy support
if app.config.get('USE_HTTPS'):
app.config['PREFERRED_URL_SCHEME'] = 'https'
# Explicitly set the database URI to ensure correct path
app.config['SQLALCHEMY_DATABASE_URI'] = f'sqlite:///{db_path}'