From 20df43c95d5745a4c80d2dafbeb27c05a4a69749 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Sat, 29 Mar 2025 15:35:11 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E8=B7=A8?= =?UTF-8?q?=E5=9F=9F=E8=BF=94=E5=9B=9E=E5=A4=B4=E4=B8=AD=E5=85=81=E8=AE=B8?= =?UTF-8?q?Authorization=E6=9A=B4=E9=9C=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 4 ++-- .env.local | 4 ++++ config/cors.php | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.env.dev b/.env.dev index 23c230e5..04e48005 100644 --- a/.env.dev +++ b/.env.dev @@ -12,8 +12,8 @@ DB_PREFIX = ow_ DEFAULT_LANG = zh-cn [JWT] -TTL = 3600 -REFRESH_TTL = 20160 +TTL=3600 +REFRESH_TTL=20160 SECRET=b43e6276644ed60e65c50d1b324ba10b # 后台不需要登录的接口 diff --git a/.env.local b/.env.local index 3693f413..2341dadf 100644 --- a/.env.local +++ b/.env.local @@ -20,3 +20,7 @@ SECRET=b43e6276644ed60e65c50d1b324ba10b [ADMIN_AUTH] WHITE_LIST[] = v1/user/login WHITE_LIST[] = v1/user/captcha + +# 不需记录日志的接口 +[ADMIN_API] +IGNORE_LOGGING_LIST[] = v1/OperateLog/index \ No newline at end of file diff --git a/config/cors.php b/config/cors.php index cbfca695..b685d4e6 100644 --- a/config/cors.php +++ b/config/cors.php @@ -6,7 +6,7 @@ return [ 'allowed_origins_patterns' => [], 'allowed_methods' => ['GET', 'POST', 'DELETE', 'PUT', 'OPTIONS'], 'allowed_headers' => ['Content-Type', 'Authorization', 'Refresh-Authorization', 'Content-Disposition'], - 'exposed_headers' => [], + 'exposed_headers' => ['Authorization'], 'max_age' => 7200, 'supports_credentials' => true, ];