Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/config/session.php
7382 views
1
<?php
2
3
use Illuminate\Support\Str;
4
5
return [
6
/*
7
|--------------------------------------------------------------------------
8
| Default Session Driver
9
|--------------------------------------------------------------------------
10
|
11
| This option determines the default session driver that is utilized for
12
| incoming requests. Laravel supports a variety of storage options to
13
| persist session data. Database storage is a great default choice.
14
|
15
| Supported: "file", "cookie", "database", "apc",
16
| "memcached", "redis", "dynamodb", "array"
17
|
18
*/
19
20
'driver' => env('SESSION_DRIVER', 'redis'),
21
22
/*
23
|--------------------------------------------------------------------------
24
| Session Lifetime
25
|--------------------------------------------------------------------------
26
|
27
| Here you may specify the number of minutes that you wish the session
28
| to be allowed to remain idle before it expires. If you want them
29
| to expire immediately when the browser is closed then you may
30
| indicate that via the expire_on_close configuration option.
31
|
32
*/
33
34
'lifetime' => env('SESSION_LIFETIME', 720),
35
36
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
37
38
/*
39
|--------------------------------------------------------------------------
40
| Session Encryption
41
|--------------------------------------------------------------------------
42
|
43
| This option allows you to easily specify that all of your session data
44
| should be encrypted before it's stored. All encryption is performed
45
| automatically by Laravel and you may use the session like normal.
46
|
47
*/
48
49
'encrypt' => env('SESSION_ENCRYPT', true),
50
51
/*
52
|--------------------------------------------------------------------------
53
| Session File Location
54
|--------------------------------------------------------------------------
55
|
56
| When utilizing the "file" session driver, the session files are placed
57
| on disk. The default storage location is defined here; however, you
58
| are free to provide another location where they should be stored.
59
|
60
*/
61
62
'files' => storage_path('framework/sessions'),
63
64
/*
65
|--------------------------------------------------------------------------
66
| Session Database Connection
67
|--------------------------------------------------------------------------
68
|
69
| When using the "database" or "redis" session drivers, you may specify a
70
| connection that should be used to manage these sessions. This should
71
| correspond to a connection in your database configuration options.
72
|
73
*/
74
75
'connection' => env('SESSION_CONNECTION'),
76
77
/*
78
|--------------------------------------------------------------------------
79
| Session Database Table
80
|--------------------------------------------------------------------------
81
|
82
| When using the "database" session driver, you may specify the table to
83
| be used to store sessions. Of course, a sensible default is defined
84
| for you; however, you're welcome to change this to another table.
85
|
86
*/
87
88
'table' => env('SESSION_TABLE', 'sessions'),
89
90
/*
91
|--------------------------------------------------------------------------
92
| Session Cache Store
93
|--------------------------------------------------------------------------
94
|
95
| When using one of the framework's cache driven session backends, you may
96
| define the cache store which should be used to store the session data
97
| between requests. This must match one of your defined cache stores.
98
|
99
| Affects: "apc", "dynamodb", "memcached", "redis"
100
|
101
*/
102
103
'store' => env('SESSION_STORE'),
104
105
/*
106
|--------------------------------------------------------------------------
107
| Session Sweeping Lottery
108
|--------------------------------------------------------------------------
109
|
110
| Some session drivers must manually sweep their storage location to get
111
| rid of old sessions from storage. Here are the chances that it will
112
| happen on a given request. By default, the odds are 2 out of 100.
113
|
114
*/
115
116
'lottery' => [2, 100],
117
118
/*
119
|--------------------------------------------------------------------------
120
| Session Cookie Name
121
|--------------------------------------------------------------------------
122
|
123
| Here you may change the name of the session cookie that is created by
124
| the framework. Typically, you should not need to change this value
125
| since doing so does not grant a meaningful security improvement.
126
|
127
*/
128
129
'cookie' => env(
130
'SESSION_COOKIE',
131
Str::slug(env('APP_NAME', 'pterodactyl'), '_') . '_session'
132
),
133
134
/*
135
|--------------------------------------------------------------------------
136
| Session Cookie Path
137
|--------------------------------------------------------------------------
138
|
139
| The session cookie path determines the path for which the cookie will
140
| be regarded as available. Typically, this will be the root path of
141
| your application, but you're free to change this when necessary.
142
|
143
*/
144
145
'path' => env('SESSION_PATH', '/'),
146
147
/*
148
|--------------------------------------------------------------------------
149
| Session Cookie Domain
150
|--------------------------------------------------------------------------
151
|
152
| This value determines the domain and subdomains the session cookie is
153
| available to. By default, the cookie will be available to the root
154
| domain and all subdomains. Typically, this shouldn't be changed.
155
|
156
*/
157
158
'domain' => env('SESSION_DOMAIN'),
159
160
/*
161
|--------------------------------------------------------------------------
162
| HTTPS Only Cookies
163
|--------------------------------------------------------------------------
164
|
165
| By setting this option to true, session cookies will only be sent back
166
| to the server if the browser has a HTTPS connection. This will keep
167
| the cookie from being sent to you when it can't be done securely.
168
|
169
*/
170
171
'secure' => env('SESSION_SECURE_COOKIE'),
172
173
/*
174
|--------------------------------------------------------------------------
175
| HTTP Access Only
176
|--------------------------------------------------------------------------
177
|
178
| Setting this value to true will prevent JavaScript from accessing the
179
| value of the cookie and the cookie will only be accessible through
180
| the HTTP protocol. It's unlikely you should disable this option.
181
|
182
*/
183
184
'http_only' => env('SESSION_HTTP_ONLY', true),
185
186
/*
187
|--------------------------------------------------------------------------
188
| Same-Site Cookies
189
|--------------------------------------------------------------------------
190
|
191
| This option determines how your cookies behave when cross-site requests
192
| take place, and can be used to mitigate CSRF attacks. By default, we
193
| will set this value to "lax" to permit secure cross-site requests.
194
|
195
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
196
|
197
| Supported: "lax", "strict", "none", null
198
|
199
*/
200
201
'same_site' => env('SESSION_SAME_SITE', 'lax'),
202
203
/*
204
|--------------------------------------------------------------------------
205
| Partitioned Cookies
206
|--------------------------------------------------------------------------
207
|
208
| Setting this value to true will tie the cookie to the top-level site for
209
| a cross-site context. Partitioned cookies are accepted by the browser
210
| when flagged "secure" and the Same-Site attribute is set to "none".
211
|
212
*/
213
214
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
215
];
216
217