# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
    secret: '%env(APP_SECRET)%'

    # Note that the session will be started ONLY if you read or write from it.
    session: true

    # Derrière Traefik (RFC-1918) — nécessaire pour que getClientIp() retourne
    # l'IP réelle du client et non l'IP interne du reverse proxy.
    # Sans ça, le rate limiting est inopérant (tous les clients partagent l'IP Traefik).
    trusted_proxies: '127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16'
    trusted_headers:
        - 'x-forwarded-for'
        - 'x-forwarded-host'
        - 'x-forwarded-proto'
        - 'x-forwarded-port'
        - 'x-forwarded-prefix'

    #esi: true
    #fragments: true

when@test:
    framework:
        test: true
        session:
            storage_factory_id: session.storage.factory.mock_file
