From 871ff9e65fea5588b1018d8770db6fc6ad37069d Mon Sep 17 00:00:00 2001 From: suyar <296399959@qq.com> Date: Thu, 17 Feb 2022 23:16:40 +0800 Subject: [PATCH] [9.x] Update sanctum config file (#5820) * Update sanctum config file * Update composer.json Co-authored-by: suyaqi Co-authored-by: Dries Vints --- composer.json | 2 +- config/sanctum.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 0aa742ea..5f338913 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "fruitcake/laravel-cors": "^2.0.5", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^9.0", - "laravel/sanctum": "^2.14", + "laravel/sanctum": "^2.14.1", "laravel/tinker": "^2.7" }, "require-dev": { diff --git a/config/sanctum.php b/config/sanctum.php index 9281c92d..529cfdc9 100644 --- a/config/sanctum.php +++ b/config/sanctum.php @@ -1,5 +1,7 @@ explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( '%s%s', 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', - env('APP_URL') ? ','.parse_url(env('APP_URL'), PHP_URL_HOST) : '' + Sanctum::currentApplicationUrlWithPort() ))), /*