Permettre la connexion HTTP en environnement de test
Some checks are pending
CI - Tests et Syntax / lint-and-test (push) Waiting to run

This commit is contained in:
root 2026-08-21 17:29:16 +00:00
parent 785c8aabcb
commit 699d094796
2 changed files with 7 additions and 1 deletions

View file

@ -70,7 +70,10 @@ class DevelopmentConfig(Config):
class ProductionConfig(Config): class ProductionConfig(Config):
"""Configuration production.""" """Configuration production."""
DEBUG = False DEBUG = False
SESSION_COOKIE_SECURE = True # HTTPS reste obligatoire par défaut. Le profil de développement Docker
# peut explicitement passer SESSION_COOKIE_SECURE=0 lorsqu'il est exposé
# directement en HTTP, sans modifier le comportement production standard.
SESSION_COOKIE_SECURE = os.environ.get('SESSION_COOKIE_SECURE', '1') == '1'
class TestingConfig(Config): class TestingConfig(Config):
"""Configuration tests.""" """Configuration tests."""

View file

@ -4,6 +4,9 @@ services:
GMAO_VERSION: ${GMAO_VERSION:-0.1.0-dev.1} GMAO_VERSION: ${GMAO_VERSION:-0.1.0-dev.1}
GMAO_GUNICORN_FLAGS: --reload --reload-engine poll GMAO_GUNICORN_FLAGS: --reload --reload-engine poll
FLASK_ENV: development FLASK_ENV: development
# Ce profil est servi en HTTP sur le réseau de test ; un cookie Secure
# ne serait jamais renvoyé par le navigateur lors de la connexion.
SESSION_COOKIE_SECURE: "0"
volumes: volumes:
- ./app_new:/app/app_new - ./app_new:/app/app_new
- ./migrations:/app/migrations - ./migrations:/app/migrations