feat(serverConfigs): enhance jumphost server filtering logic for backward compatibility
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m24s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m24s
This commit is contained in:
@@ -62,8 +62,18 @@ async function getServerConfigsList(req, res) {
|
||||
}
|
||||
|
||||
// Фильтруем только jumphost серверы и добавляем id/name для совместимости с фронтендом
|
||||
// Fallback: если type не указан, но есть gateways - считаем jumphost (обратная совместимость)
|
||||
const jumphostServers = allServers
|
||||
.filter(s => String(s.type || '').toLowerCase() === 'jumphost')
|
||||
.filter(s => {
|
||||
const serverType = String(s.type || '').toLowerCase();
|
||||
// Явно jumphost
|
||||
if (serverType === 'jumphost') return true;
|
||||
// Явно exit - пропускаем
|
||||
if (serverType === 'exit') return false;
|
||||
// Тип не указан, но есть gateways - считаем jumphost (обратная совместимость)
|
||||
if (!serverType && Array.isArray(s.gateways) && s.gateways.length > 0) return true;
|
||||
return false;
|
||||
})
|
||||
.map(s => ({
|
||||
...s,
|
||||
// Для совместимости с EasySwitchManager добавляем id и name из dns
|
||||
|
||||
@@ -12,5 +12,9 @@ export default defineConfig({
|
||||
secure: false,
|
||||
},
|
||||
},
|
||||
// Отключаем кеширование в dev режиме
|
||||
headers: {
|
||||
'Cache-Control': 'no-store',
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user