- 增加 Agent Run MVP-0,包括 RunDispatcher 和 AgentRunJob - 优化队列配置,支持 Redis 队列驱动,添加 Horizon 容器 - 更新 Docker 配置,细化角色分工,新增 Horizon 配置 - 增加测试任务 `TestJob`,扩展队列使用示例 - 更新 OpenAPI 规范,添加 Agent Run 相关接口及示例 - 编写文档,详细描述 Agent Run 流程与 MVP-0 功能 - 优化相关服务与文档,支持队列与异步运行
56 lines
1.2 KiB
PHP
56 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\Facades\Gate;
|
|
use Laravel\Telescope\IncomingEntry;
|
|
use Laravel\Telescope\Telescope;
|
|
use Laravel\Telescope\TelescopeApplicationServiceProvider;
|
|
|
|
class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
Telescope::night();
|
|
|
|
$this->hideSensitiveRequestDetails();
|
|
|
|
$isLocal = $this->app->environment('local');
|
|
}
|
|
|
|
/**
|
|
* Prevent sensitive request details from being logged by Telescope.
|
|
*/
|
|
protected function hideSensitiveRequestDetails(): void
|
|
{
|
|
if ($this->app->environment('local')) {
|
|
return;
|
|
}
|
|
|
|
Telescope::hideRequestParameters(['_token']);
|
|
|
|
Telescope::hideRequestHeaders([
|
|
'cookie',
|
|
'x-csrf-token',
|
|
'x-xsrf-token',
|
|
]);
|
|
}
|
|
|
|
/**
|
|
* Register the Telescope gate.
|
|
*
|
|
* This gate determines who can access Telescope in non-local environments.
|
|
*/
|
|
protected function gate(): void
|
|
{
|
|
Gate::define('viewTelescope', function ($user) {
|
|
return in_array($user->email, [
|
|
//
|
|
]);
|
|
});
|
|
}
|
|
}
|