feat: 添加 JWT 支持与开发环境配置,更新 API 路由与中间件

This commit is contained in:
2026-05-08 14:41:01 +08:00
parent bbf58cb076
commit 9f8080cefe
18 changed files with 383 additions and 14 deletions

View File

@@ -10,6 +10,8 @@ class HealthController extends Controller
{
/**
* 健康检查Next / 网关探活。路径GET /api/v1/health
*
* 非调试环境不返回框架版本号,避免信息泄露。
*/
public function __invoke(): JsonResponse
{
@@ -19,7 +21,7 @@ class HealthController extends Controller
];
if (config('app.debug')) {
$payload['laravel'] = app()->version();
$payload['laravel'] = app()->version(); // 仅本地/调试
}
return ApiResponse::success($payload);