Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/config/sanctum.php
7382 views
1
<?php
2
3
return [
4
/*
5
|--------------------------------------------------------------------------
6
| Stateful Domains
7
|--------------------------------------------------------------------------
8
|
9
| Requests from the following domains / hosts will receive stateful API
10
| authentication cookies. Typically, these should include your local
11
| and production domains which access your API via a frontend SPA.
12
|
13
*/
14
15
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
16
'%s%s',
17
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
18
Laravel\Sanctum\Sanctum::currentApplicationUrlWithPort()
19
))),
20
21
/*
22
|--------------------------------------------------------------------------
23
| Sanctum Guards
24
|--------------------------------------------------------------------------
25
|
26
| This array contains the authentication guards that will be checked when
27
| Sanctum is trying to authenticate a request. If none of these guards
28
| are able to authenticate the request, Sanctum will use the bearer
29
| token that's present on an incoming request for authentication.
30
|
31
*/
32
33
'guard' => ['web'],
34
35
/*
36
|--------------------------------------------------------------------------
37
| Expiration Minutes
38
|--------------------------------------------------------------------------
39
|
40
| This value controls the number of minutes until an issued token will be
41
| considered expired. If this value is null, personal access tokens do
42
| not expire. This won't tweak the lifetime of first-party sessions.
43
|
44
*/
45
46
'expiration' => null,
47
48
/*
49
|--------------------------------------------------------------------------
50
| Sanctum Middleware
51
|--------------------------------------------------------------------------
52
|
53
| When authenticating your first-party SPA with Sanctum you may need to
54
| customize some of the middleware Sanctum uses while processing the
55
| request. You may change the middleware listed below as required.
56
|
57
*/
58
59
'middleware' => [
60
'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class,
61
'encrypt_cookies' => Pterodactyl\Http\Middleware\EncryptCookies::class,
62
'verify_csrf_token' => Pterodactyl\Http\Middleware\VerifyCsrfToken::class,
63
],
64
];
65
66