added session expiration settings
This commit is contained in:
4
.env
4
.env
@@ -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 ###
|
||||
|
||||
26
config/packages/framework.yaml
Normal file
26
config/packages/framework.yaml
Normal 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
|
||||
Reference in New Issue
Block a user