#feature: add ip operation log & sql generator

This commit is contained in:
tradewind committed 2025-12-25 14:25:57 +08:00
1 parent 79889e1040
commit 3bcbd0661f
21 files changed
+1751 -21

No files matched your search

+8 -1
View File
@@ -13,12 +13,19 @@ return Application::configure(basePath: dirname(__DIR__))
health: '/up',
)
->withMiddleware(function (Middleware $middleware): void {
$middleware->alias([
'admin.ip' => \App\Http\Middleware\AdminIpMiddleware::class,
]);
$middleware->appendToGroup('api', \App\Http\Middleware\OperationLogMiddleware::class);
// 为 API 路由添加 CSRF 豁免
$middleware->validateCsrfTokens(except: [
'api/jira/*',
'api/env/*',
'api/message-sync/*',
'api/message-dispatch/*'
'api/message-dispatch/*',
'api/admin/*',
]);
})
->withExceptions(function (Exceptions $exceptions): void {