Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 837 Bytes

120_CookieSettings.md

File metadata and controls

41 lines (31 loc) · 837 Bytes

Cookie settings

If you want to change the Symfony default cookie settings, you have an option to do so.

Set custom cookie settings

You can have custom settings with fallbacks to default by adding each of them to your projects config like this:

Customizing the raw cookie parameter using this config is not implemented right now!

# config/packages/i18n.yaml
i18n:
    cookie:
        path: '/yourpath/'
        domain: 'yourdomain.com'
        secure: true
        httpOnly: true
        sameSite: strict

Default values

# config/packages/i18n.yaml
i18n:
    cookie:
        path: '/'
        domain: null
        secure: false
        httpOnly: true
        sameSite: lax

Possible values for sameSite parameter

The sameSite parameter supports the following values:

  • none
  • lax
  • strict