4.7.1: Фикс открытия админ-панели
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m11s

This commit is contained in:
poignatov
2026-02-02 19:16:49 +03:00
parent b15e1dd615
commit 89e66d6093
10 changed files with 282 additions and 28 deletions

View File

@@ -57,6 +57,9 @@ export default defineConfig(({ mode }) => {
// Кэширование статики
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff,woff2}'],
// Исключаем /admin из навигационного fallback (чтобы Service Worker не перехватывал)
navigateFallbackDenylist: [/^\/admin/],
// Стратегии для API
runtimeCaching: [
{
@@ -138,6 +141,33 @@ export default defineConfig(({ mode }) => {
changeOrigin: true,
secure: false,
},
// Proxy admin panel to backend
'/admin': {
target: 'http://localhost:8080',
changeOrigin: true,
secure: false,
},
'/admin.html': {
target: 'http://localhost:8080',
changeOrigin: true,
secure: false,
},
// Proxy admin API endpoints
'/message/post': {
target: 'http://localhost:8080',
changeOrigin: true,
secure: false,
},
'/weekly_goals/setup': {
target: 'http://localhost:8080',
changeOrigin: true,
secure: false,
},
'/daily-report/trigger': {
target: 'http://localhost:8080',
changeOrigin: true,
secure: false,
},
}
}
}