feat(config): 新增用户前端访问开关
新增 `frontend_enable` 配置并接入后台站点设置, 用于控制用户首页、订阅入口及用户侧 API 是否对外开放。 开关关闭时相关用户入口统一返回空 404, 同时保留节点 API、管理后台与外部回调接口可访问。 补充特性测试覆盖默认开启、关闭隐藏与节点接口白名单场景
This commit is contained in:
@@ -14,14 +14,18 @@ class GuestRoute
|
||||
$router->group([
|
||||
'prefix' => 'guest'
|
||||
], function ($router) {
|
||||
// Plan
|
||||
$router->get('/plan/fetch', [PlanController::class, 'fetch']);
|
||||
$router->group([
|
||||
'middleware' => 'user.frontend'
|
||||
], function ($router) {
|
||||
// Plan
|
||||
$router->get('/plan/fetch', [PlanController::class, 'fetch']);
|
||||
// Comm
|
||||
$router->get('/comm/config', [CommController::class, 'config']);
|
||||
});
|
||||
// Telegram
|
||||
$router->post('/telegram/webhook', [TelegramController::class, 'webhook']);
|
||||
// Payment
|
||||
$router->match(['get', 'post'], '/payment/notify/{method}/{uuid}', [PaymentController::class, 'notify']);
|
||||
// Comm
|
||||
$router->get('/comm/config', [CommController::class, 'config']);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user