webdelo / laravel-telescope-route
插件帮助隐藏API后端上的Telescope。
dev-master
2019-12-02 17:28 UTC
Requires (Dev)
- laravel/framework: ^6.0@dev
This package is auto-updated.
Last update: 2024-09-29 05:48:42 UTC
README
插件帮助隐藏API后端上的Telescope。
如果你需要在生产API后端审查一些流程,你只需要启用Telescope。
如果你需要在生产API后端安全地审查一些流程,避免外界的眼睛,你应该使用这个插件。
标准的权限门使用会话授权机制来授权用户访问Telescope仪表板,但这种机制在提供token授权的API上不适用。
安装
composer require webdelo/laravel-telescope-route
config/telescope.php
<?php use \Webdelo\TelescopeRoute\Facades\TelescopeRoute; return [ //... /* |-------------------------------------------------------------------------- | Telescope Path |-------------------------------------------------------------------------- | | This is the URI path where Telescope will be accessible from. Feel free | to change this path to anything you like. Note that the URI will not | affect the paths of its internal API that aren't exposed to users. | */ 'path' => env('TELESCOPE_PATH', TelescopeRoute::route()), //... ];
使用方法
生成或获取Telescope的唯一路由
php artisan telescope:route
刷新Telescope的唯一路由
php artisan telescope:route-refresh