Skip to content

Commit 871ff9e

Browse files
suyarsuyaqidriesvints
authored
[9.x] Update sanctum config file (laravel#5820)
* Update sanctum config file * Update composer.json Co-authored-by: suyaqi <suyaqi@wy.net> Co-authored-by: Dries Vints <dries@vints.io>
1 parent 4a6229a commit 871ff9e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"fruitcake/laravel-cors": "^2.0.5",
1010
"guzzlehttp/guzzle": "^7.2",
1111
"laravel/framework": "^9.0",
12-
"laravel/sanctum": "^2.14",
12+
"laravel/sanctum": "^2.14.1",
1313
"laravel/tinker": "^2.7"
1414
},
1515
"require-dev": {

config/sanctum.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use Laravel\Sanctum\Sanctum;
4+
35
return [
46

57
/*
@@ -16,7 +18,7 @@
1618
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
1719
'%s%s',
1820
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
19-
env('APP_URL') ? ','.parse_url(env('APP_URL'), PHP_URL_HOST) : ''
21+
Sanctum::currentApplicationUrlWithPort()
2022
))),
2123

2224
/*

0 commit comments

Comments
 (0)