2016-06-20 13:35:59 +00:00
|
|
|
<?php
|
|
|
|
|
2019-11-08 12:08:34 +00:00
|
|
|
use Illuminate\Support\Str;
|
|
|
|
|
2016-06-20 13:35:59 +00:00
|
|
|
return [
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Default Session Driver
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
| This option determines the default session driver that is utilized for
|
|
|
|
| incoming requests. Laravel supports a variety of storage options to
|
|
|
|
| persist session data. Database storage is a great default choice.
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
|
| Supported: "file", "cookie", "database", "apc",
|
2019-11-08 12:08:34 +00:00
|
|
|
| "memcached", "redis", "dynamodb", "array"
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
'driver' => env('SESSION_DRIVER', 'database'),
|
2016-06-20 13:35:59 +00: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
|
2024-08-25 08:26:29 +00:00
|
|
|
| to expire immediately when the browser is closed then you may
|
|
|
|
| indicate that via the expire_on_close configuration option.
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2019-11-08 12:08:34 +00:00
|
|
|
'lifetime' => env('SESSION_LIFETIME', 120),
|
2016-06-20 13:35:59 +00:00
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Session Encryption
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| This option allows you to easily specify that all of your session data
|
2024-08-25 08:26:29 +00:00
|
|
|
| should be encrypted before it's stored. All encryption is performed
|
|
|
|
| automatically by Laravel and you may use the session like normal.
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
'encrypt' => env('SESSION_ENCRYPT', false),
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Session File Location
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
| When utilizing the "file" session driver, the session files are placed
|
|
|
|
| on disk. The default storage location is defined here; however, you
|
|
|
|
| are free to provide another location where they should be stored.
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
'files' => storage_path('framework/sessions'),
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| 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.
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
'connection' => env('SESSION_CONNECTION'),
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Session Database Table
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
| When using the "database" session driver, you may specify the table to
|
|
|
|
| be used to store sessions. Of course, a sensible default is defined
|
|
|
|
| for you; however, you're welcome to change this to another table.
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
'table' => env('SESSION_TABLE', 'sessions'),
|
2016-06-20 13:35:59 +00:00
|
|
|
|
2019-11-08 12:08:34 +00:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Session Cache Store
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
| When using one of the framework's cache driven session backends, you may
|
|
|
|
| define the cache store which should be used to store the session data
|
|
|
|
| between requests. This must match one of your defined cache stores.
|
|
|
|
|
|
|
|
|
| Affects: "apc", "dynamodb", "memcached", "redis"
|
2019-11-08 12:08:34 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
'store' => env('SESSION_STORE'),
|
2019-11-08 12:08:34 +00:00
|
|
|
|
2016-06-20 13:35:59 +00: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
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
| Here you may change the name of the session cookie that is created by
|
|
|
|
| the framework. Typically, you should not need to change this value
|
|
|
|
| since doing so does not grant a meaningful security improvement.
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2019-11-08 12:08:34 +00:00
|
|
|
'cookie' => env(
|
|
|
|
'SESSION_COOKIE',
|
|
|
|
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
|
|
|
|
),
|
2016-06-20 13:35:59 +00: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
|
2024-08-25 08:26:29 +00:00
|
|
|
| your application, but you're free to change this when necessary.
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
'path' => env('SESSION_PATH', '/'),
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Session Cookie Domain
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
| This value determines the domain and subdomains the session cookie is
|
|
|
|
| available to. By default, the cookie will be available to the root
|
|
|
|
| domain and all subdomains. Typically, this shouldn't be changed.
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
'domain' => env('SESSION_DOMAIN'),
|
2016-06-20 13:35:59 +00: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
|
2024-08-25 08:26:29 +00:00
|
|
|
| the cookie from being sent to you when it can't be done securely.
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
'secure' => env('SESSION_SECURE_COOKIE'),
|
2016-06-20 13:35:59 +00: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
|
2024-08-25 08:26:29 +00:00
|
|
|
| the HTTP protocol. It's unlikely you should disable this option.
|
2016-06-20 13:35:59 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
'http_only' => env('SESSION_HTTP_ONLY', true),
|
2016-06-20 13:35:59 +00:00
|
|
|
|
2019-11-08 12:08:34 +00:00
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Same-Site Cookies
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| This option determines how your cookies behave when cross-site requests
|
|
|
|
| take place, and can be used to mitigate CSRF attacks. By default, we
|
2024-08-25 08:26:29 +00:00
|
|
|
| will set this value to "lax" to permit secure cross-site requests.
|
|
|
|
|
|
|
|
|
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
|
|
|
|
|
|
|
|
|
| Supported: "lax", "strict", "none", null
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
'same_site' => env('SESSION_SAME_SITE', 'lax'),
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Partitioned Cookies
|
|
|
|
|--------------------------------------------------------------------------
|
2019-11-08 12:08:34 +00:00
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
| Setting this value to true will tie the cookie to the top-level site for
|
|
|
|
| a cross-site context. Partitioned cookies are accepted by the browser
|
|
|
|
| when flagged "secure" and the Same-Site attribute is set to "none".
|
2019-11-08 12:08:34 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2024-08-25 08:26:29 +00:00
|
|
|
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
|
2019-11-08 12:08:34 +00:00
|
|
|
|
2016-06-20 13:35:59 +00:00
|
|
|
];
|