Enhance configuration and logging for user management commands
CI / Backend (build + test) (push) Successful in 1m18s
CI / Frontend (lint + typecheck + build) (push) Successful in 31s

- Updated `.env.example` to include new settings for trusted proxies and networks for better security with X-Forwarded headers.
- Modified `BlockUserCommandHandler` and `UnblockUserCommandHandler` to include logging for gateway update failures, ensuring better traceability of issues during user blocking/unblocking.
- Adjusted tests for command handlers to incorporate logging functionality, improving test coverage and reliability.
- Updated frontend configuration to dynamically set the server port based on environment variables.
This commit is contained in:
Leonid Pershin
2026-07-02 14:33:32 +03:00
parent cdd67f8e2b
commit c04e0d7261
13 changed files with 162 additions and 17 deletions
+6
View File
@@ -8,6 +8,12 @@ import { ThemeProvider } from './theme/ThemeProvider'
import { ToastProvider } from './shared/ui/toast-store'
import { RealtimeProvider } from './shared/realtime/RealtimeProvider'
import { router } from './router'
import { setUnauthorizedHandler } from './shared/api/client'
import { clearSession } from './features/auth/api'
// Если refresh-токен недействителен (истёк/отозван) — очищаем стор авторизации, чтобы
// useRequireAuth/useRequireAdmin увидели user === null и сами увели на /login.
setUnauthorizedHandler(clearSession)
const queryClient = new QueryClient()