Skip to content

Commit 5dd5628

Browse files
committed
fix(config): 清理器 cleaners
cleaners:array 每次请求的清理器列表,用于清理一些残留的全局变量、单例对象、静态属性,避免多次请求间数据污染。这些清理器类必须实现接口 Hhxsv5\LaravelS\Illuminate\Cleaners\CleanerInterface。清理的顺序与数组的顺序保持一致。这些清理器默认已启用。
1 parent 9d61c72 commit 5dd5628

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

laravel/config/laravels.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@
4242
],
4343
'swoole_tables' => [
4444
],
45+
'cleaners' => [
46+
//Hhxsv5\LaravelS\Illuminate\Cleaners\SessionCleaner::class, // 如果你的项目中使用到了Session或Authentication,请解除这行注释
47+
//Hhxsv5\LaravelS\Illuminate\Cleaners\AuthCleaner::class, // 如果你的项目中使用到了Authentication或Passport,请解除这行注释
48+
Hhxsv5\LaravelS\Illuminate\Cleaners\JWTCleaner::class, // 如果你的项目中使用到了包"tymon/jwt-auth",请解除这行注释
49+
//...
50+
],
4551
'register_providers' => [
4652
],
4753
'swoole' => [

0 commit comments

Comments
 (0)