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)
app.config.update(
SESSION_COOKIE_SAMESITE="None", # necessary for cross-site cookies
SESSION_COOKIE_SECURE=False # True in prod (HTTPS)
)
if env == "production":
app.config.update(SESSION_COOKIE_SAMESITE="None", SESSION_COOKIE_SECURE=True)
else:
app.config.update(SESSION_COOKIE_SAMESITE="Lax", SESSION_COOKIE_SECURE=False)
env = os.environ.get('FLASK_ENV', 'default')
app.config.from_object(config[env])