added session expiration settings

This commit is contained in:
ayushrajsrivastava.akeneo736
2025-06-13 18:23:54 +05:30
parent 435f729eba
commit 379d69131c
2 changed files with 30 additions and 0 deletions

4
.env
View File

@@ -27,6 +27,10 @@ APP_SECRET=YOUR_APP_SECRET
DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name
###< doctrine/doctrine-bundle ###
###> session expiration ###
# Set the session expiration time in seconds.
UV_SESSION_COOKIE_LIFETIME=1440 # default is 1440 seconds (24 minutes)
###> symfony/mailer ###
MAILER_DSN=null://null
###< symfony/mailer ###

View File

@@ -0,0 +1,26 @@
# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
secret: '%env(APP_SECRET)%'
#csrf_protection: true
http_method_override: false
# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
session:
handler_id: null
cookie_secure: auto
cookie_samesite: lax
cookie_lifetime: '%env(int:UV_SESSION_COOKIE_LIFETIME)%'
gc_maxlifetime: '%env(int:UV_SESSION_COOKIE_LIFETIME)%'
storage_factory_id: session.storage.factory.native
#esi: true
#fragments: true
php_errors:
log: true
when@test:
framework:
test: true
session:
storage_factory_id: session.storage.factory.mock_file