jonnybarnes.uk/config/session.php

219 lines
7.7 KiB
PHP
Raw Normal View History

2016-05-19 15:01:28 +01:00
<?php
Get repo up to date with changes in laravel/laravel (issue #95) Squashed commit of the following: commit 850a0dfe70412f0851d1f40fe96c7afdc8348aab Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Jan 27 13:42:09 2019 +0000 Persist data cache commit fc80710c96b33bf387e346f97a58ed3965520427 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Jan 27 13:15:10 2019 +0000 Added another laravel dependency commit 1a9ed1bc71e3a11624e4924ae75c4284e6071f6d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Jan 27 13:14:50 2019 +0000 Fix trailing comma commit 81f31ae7116146b073c8f886cb74e32d806eba60 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 19:07:55 2019 +0000 Add Laravel’s illustration SVGs commit d1f99e4ec2b39d0159689f586f37465cbf867c2b Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 19:07:34 2019 +0000 Add the dump-server commit 28a09927a32d20510f6bc236d14daf948c5dd547 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:58:27 2019 +0000 Add mailgin endpoint commit e80e3a9d53852d5f137918d79969f5a3a93fad81 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:55:11 2019 +0000 Update cache config commit 3db2f952d420be7e49041d495db6ee59ee310841 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:50:02 2019 +0000 Update session config commit 0b431150616cb15f17b571e9340e6805723344d6 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:46:05 2019 +0000 Add faker locale setting commit 048e8ee0c7969ed9b2251f270aea8fee25b3bf98 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:44:09 2019 +0000 Add new Stripe webhook config values commit 18ce7bee19fca7f920fdcca72049108fd5a7a9b6 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:42:57 2019 +0000 Add Authenticate to middleware commit 05007f1f038cac4453e4b5d82cb04d6f0820606c Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:34:28 2019 +0000 Update phpunit config commit 5c033735fbe148b3f3e3950ae97a21977895eeb7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:32:18 2019 +0000 Update queue config commit fe92a6f2896a52ab1486288878055cd81abe28e7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:27:22 2019 +0000 Update database config commit 19036d7cb1ffc583a571451a7ea00fb421beef8f Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:22:41 2019 +0000 Add asset_url config option commit ce4b1e3195a6c43fdc4f6fabb2a41b68344220fc Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:20:40 2019 +0000 Allow custom compiled views path commit b503bca8c6a27fef44d34b826c75a2ee68e0a178 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:20:18 2019 +0000 Add mail logging setting commit 2988ba197bbd1b0ac78a17ad796f31cc0bb803df Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:17:41 2019 +0000 normalize composer.json commit a1ff37d716c68f1dedec9644e9fe6f3a7a5ad04f Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:11:58 2019 +0000 Allow env for defining app base commit e662de24e3a2b7f170c6fb0860c6c16f192aa642 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:10:17 2019 +0000 Get kernel/middleware upto date commit 2f8c9de52bec8a54fa6745a42c9a8974de0a1467 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:04:44 2019 +0000 Update validation lang file commit 8f6bf24eec602b21d28b0b6bae6e274c175ff643 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 18:02:28 2019 +0000 Update .gitignore commit e219cc454f3e77b822fe761c672bf24824c06d0c Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 17:59:32 2019 +0000 Update logging.php config file commit 5a13e1b89f9311918f3f9756d9607424f42e72c5 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 17:56:36 2019 +0000 Remove extra whitespace commit 68edee0a9dca0d11d18964329d7f0ec49d32c6e8 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 17:53:30 2019 +0000 Recompile assets from new resources folder structure commit 7ec8441a802cb1385fb40cdd22b2398180287512 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 17:44:56 2019 +0000 Change reference to assets files in various scripts commit c2f6dfccf2843b25038475d2a5f492decc9e8124 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Jan 26 17:42:25 2019 +0000 Flatten assets directory
2019-01-27 13:50:04 +00:00
use Illuminate\Support\Str;
2016-05-19 15:01:28 +01:00
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
2024-03-19 20:13:36 +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-05-19 15:01:28 +01:00
|
| Supported: "file", "cookie", "database", "apc",
2019-10-19 15:34:49 +01:00
| "memcached", "redis", "dynamodb", "array"
2016-05-19 15:01:28 +01:00
|
*/
2024-03-19 20:13:36 +00:00
'driver' => env('SESSION_DRIVER', 'database'),
2016-05-19 15:01:28 +01: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-03-19 20:13:36 +00:00
| to expire immediately when the browser is closed then you may
| indicate that via the expire_on_close configuration option.
2016-05-19 15:01:28 +01:00
|
*/
2025-03-01 15:00:41 +00:00
'lifetime' => (int) env('SESSION_LIFETIME', 120),
2016-05-19 15:01:28 +01:00
2024-03-19 20:13:36 +00:00
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
2016-05-19 15:01:28 +01:00
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
2024-03-19 20:13:36 +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-05-19 15:01:28 +01:00
|
*/
2024-03-19 20:13:36 +00:00
'encrypt' => env('SESSION_ENCRYPT', false),
2016-05-19 15:01:28 +01:00
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
2024-03-19 20:13:36 +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-05-19 15:01:28 +01: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.
|
*/
2022-11-16 20:28:56 +00:00
'connection' => env('SESSION_CONNECTION'),
2016-05-19 15:01:28 +01:00
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
2024-03-19 20:13:36 +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-05-19 15:01:28 +01:00
|
*/
2024-03-19 20:13:36 +00:00
'table' => env('SESSION_TABLE', 'sessions'),
2016-05-19 15:01:28 +01:00
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
2024-03-19 20:13:36 +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.
2020-10-19 19:41:50 +01:00
|
| Affects: "apc", "dynamodb", "memcached", "redis"
|
*/
2022-11-16 20:28:56 +00:00
'store' => env('SESSION_STORE'),
2016-05-19 15:01:28 +01: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-03-19 20:13:36 +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-05-19 15:01:28 +01:00
|
*/
'cookie' => env(
'SESSION_COOKIE',
2022-09-10 13:44:15 +01:00
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
),
2016-05-19 15:01:28 +01: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-03-19 20:13:36 +00:00
| your application, but you're free to change this when necessary.
2016-05-19 15:01:28 +01:00
|
*/
2024-03-19 20:13:36 +00:00
'path' => env('SESSION_PATH', '/'),
2016-05-19 15:01:28 +01:00
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
2024-03-19 20:13:36 +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-05-19 15:01:28 +01:00
|
*/
2022-11-16 20:28:56 +00:00
'domain' => env('SESSION_DOMAIN'),
2016-05-19 15:01:28 +01: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
2022-11-16 20:28:56 +00:00
| the cookie from being sent to you when it can't be done securely.
2016-05-19 15:01:28 +01:00
|
*/
2020-10-19 19:41:50 +01:00
'secure' => env('SESSION_SECURE_COOKIE'),
2016-05-19 15:01:28 +01: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-03-19 20:13:36 +00:00
| the HTTP protocol. It's unlikely you should disable this option.
2016-05-19 15:01:28 +01:00
|
*/
2024-03-19 20:13:36 +00:00
'http_only' => env('SESSION_HTTP_ONLY', true),
2016-05-19 15:01:28 +01: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-03-19 20:13:36 +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
|
2020-10-19 19:41:50 +01:00
| Supported: "lax", "strict", "none", null
|
*/
2024-03-19 20:13:36 +00:00
'same_site' => env('SESSION_SAME_SITE', 'lax'),
/*
|--------------------------------------------------------------------------
| Partitioned Cookies
|--------------------------------------------------------------------------
|
| 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".
|
*/
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
2016-05-19 15:01:28 +01:00
];