laravel/config/session.php

202 lines
6.9 KiB
PHP
Raw Normal View History

2013-01-11 15:14:07 -06:00
<?php
2018-09-28 15:55:56 -05:00
use Illuminate\Support\Str;
2014-08-24 14:03:58 -05:00
return [
2013-01-11 15:14:07 -06:00
2015-02-22 20:47:03 -06:00
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be used on
| requests. By default, we will use the lightweight native driver but
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "file", "cookie", "database", "apc",
2019-01-10 15:18:58 -06:00
| "memcached", "redis", "dynamodb", "array"
2015-02-22 20:47:03 -06:00
|
*/
2020-01-08 12:44:53 +01:00
'driver' => env('SESSION_DRIVER', 'file'),
2015-02-22 20:47:03 -06:00
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle before it expires. If you want them
| to immediately expire on the browser closing, set that option.
|
*/
'lifetime' => env('SESSION_LIFETIME', 120),
2015-02-22 20:47:03 -06:00
'expire_on_close' => false,
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it is stored. All encryption will be run
| automatically by Laravel and you can use the Session like normal.
|
*/
'encrypt' => false,
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When using the native session driver, we need a location where session
| files may be stored. A default has been set for you but a different
| location may be specified. This is only needed for file sessions.
|
*/
'files' => storage_path('framework/sessions'),
2015-02-22 20:47:03 -06:00
/*
|--------------------------------------------------------------------------
| Session Database Connection
|--------------------------------------------------------------------------
|
| When using the "database" or "redis" session drivers, you may specify a
| connection that should be used to manage these sessions. This should
| correspond to a connection in your database configuration options.
|
*/
'connection' => env('SESSION_CONNECTION'),
2015-02-22 20:47:03 -06:00
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
| When using the "database" session driver, you may specify the table we
| should use to manage the sessions. Of course, a sensible default is
| provided for you; however, you are free to change this as needed.
|
*/
'table' => 'sessions',
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
2020-05-18 10:47:20 -05:00
| While using one of the framework's cache driven session backends you may
2019-01-10 15:21:07 -06:00
| list a cache store that should be used for these sessions. This value
| must match with one of the application's configured cache "stores".
|
2020-05-18 10:47:20 -05:00
| Affects: "apc", "dynamodb", "memcached", "redis"
|
*/
'store' => env('SESSION_STORE'),
2015-02-22 20:47:03 -06:00
/*
|--------------------------------------------------------------------------
| Session Sweeping Lottery
|--------------------------------------------------------------------------
|
| Some session drivers must manually sweep their storage location to get
| rid of old sessions from storage. Here are the chances that it will
| happen on a given request. By default, the odds are 2 out of 100.
|
*/
'lottery' => [2, 100],
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| Here you may change the name of the cookie used to identify a session
| instance by ID. The name specified here will get used every time a
| new session cookie is created by the framework for every driver.
|
*/
2017-06-29 13:36:21 -05:00
'cookie' => env(
'SESSION_COOKIE',
2018-09-28 15:55:56 -05:00
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
2017-06-29 13:36:21 -05:00
),
2015-02-22 20:47:03 -06:00
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The session cookie path determines the path for which the cookie will
| be regarded as available. Typically, this will be the root path of
| your application but you are free to change this when necessary.
|
*/
'path' => '/',
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| Here you may change the domain of the cookie used to identify a session
| in your application. This will determine which domains the cookie is
| available to in your application. A sensible default has been set.
|
*/
'domain' => env('SESSION_DOMAIN'),
2015-02-22 20:47:03 -06:00
/*
|--------------------------------------------------------------------------
| HTTPS Only Cookies
|--------------------------------------------------------------------------
|
| By setting this option to true, session cookies will only be sent back
| to the server if the browser has a HTTPS connection. This will keep
| the cookie from being sent to you when it can't be done securely.
2015-02-22 20:47:03 -06:00
|
*/
'secure' => env('SESSION_SECURE_COOKIE'),
2016-03-21 09:13:22 -05:00
/*
|--------------------------------------------------------------------------
| HTTP Access Only
|--------------------------------------------------------------------------
|
| Setting this value to true will prevent JavaScript from accessing the
| value of the cookie and the cookie will only be accessible through
| the HTTP protocol. You are free to modify this option if needed.
|
*/
2016-03-21 14:12:38 +02:00
'http_only' => true,
2013-11-01 08:46:15 -05:00
2017-03-06 08:56:41 -03:00
/*
|--------------------------------------------------------------------------
2017-03-06 08:50:01 -06:00
| Same-Site Cookies
2017-03-06 08:56:41 -03:00
|--------------------------------------------------------------------------
|
2017-03-06 08:50:01 -06:00
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
2020-03-29 10:38:29 -05:00
| will set this value to "lax" since this is a secure default value.
2017-03-06 08:56:41 -03:00
|
| Supported: "lax", "strict", "none", null
2017-03-06 08:56:41 -03:00
|
*/
'same_site' => 'lax',
2017-03-06 08:56:41 -03:00
2014-08-24 14:03:58 -05:00
];