fix: Core API health check path - use /api/v1/health for all cases
- Removed incorrect localhost conditional that used /health (404) - Now uses /api/v1/health for both localhost and remote access - Added console.error logging for debugging - Aligns with Core API route design
This commit is contained in:
@@ -935,16 +935,15 @@ async function testCoreApi() {
|
||||
testingCore.value = true
|
||||
coreInfo.value = null
|
||||
try {
|
||||
const isLocalhost = coreApiUrl.value.includes('localhost') || coreApiUrl.value.includes('127.0.0.1')
|
||||
// Localhost: direct /health path
|
||||
// Remote: via reverse proxy at /api/v1/health
|
||||
const healthUrl = isLocalhost ? `${coreApiUrl.value}/health` : `${coreApiUrl.value}/api/v1/health`
|
||||
// Core API uses /api/v1/health for both localhost and remote access
|
||||
const healthUrl = `${coreApiUrl.value}/api/v1/health`
|
||||
const resp = await fetch(healthUrl, { signal: AbortSignal.timeout(5000) })
|
||||
if (!resp.ok) throw new Error(`HTTP ${resp.status}`)
|
||||
const data = await resp.json()
|
||||
coreStatus.value = 'online'
|
||||
coreInfo.value = { version: data.version, uptime: data.uptime_ms }
|
||||
} catch (e: any) {
|
||||
console.error('[testCoreApi] Failed:', e.message || e)
|
||||
coreStatus.value = 'offline'
|
||||
coreInfo.value = null
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user