ensure https in backend

This commit is contained in:
2025-09-29 01:10:19 +02:00
parent 07ecae67fe
commit e656893c68

View File

@@ -15,10 +15,10 @@ def create_app():
] ]
CORS(app, supports_credentials=True, origins=origins) CORS(app, supports_credentials=True, origins=origins)
app.config.update( if env == "production":
SESSION_COOKIE_SAMESITE="None", # necessary for cross-site cookies app.config.update(SESSION_COOKIE_SAMESITE="None", SESSION_COOKIE_SECURE=True)
SESSION_COOKIE_SECURE=False # True in prod (HTTPS) else:
) app.config.update(SESSION_COOKIE_SAMESITE="Lax", SESSION_COOKIE_SECURE=False)
env = os.environ.get('FLASK_ENV', 'default') env = os.environ.get('FLASK_ENV', 'default')
app.config.from_object(config[env]) app.config.from_object(config[env])