feat: Enable server health again

This commit is contained in:
2025-11-06 18:48:44 +01:00
parent d157de97bf
commit 935fc347df
2 changed files with 5 additions and 5 deletions

View File

@@ -6,8 +6,8 @@ export default defineNuxtPlugin(() => {
// Start the health check with a 1-minute interval // Start the health check with a 1-minute interval
// This ensures the health check starts even if app.vue's onMounted hasn't fired yet // This ensures the health check starts even if app.vue's onMounted hasn't fired yet
// nextTick(() => { nextTick(() => {
// startPeriodicHealthCheck(60000) startPeriodicHealthCheck(60000)
// }) })
} }
}) })

View File

@@ -12,14 +12,14 @@ export default defineEventHandler(async (event: H3Event) => {
const session = await getUserSession(event) const session = await getUserSession(event)
const accessToken = session?.jwt?.accessToken const accessToken = session?.jwt?.accessToken
if (!accessToken) { if (!accessToken && event.path !== '/api/actuator/health') {
throw createError({ throw createError({
statusCode: 401, statusCode: 401,
statusMessage: 'Not authenticated' statusMessage: 'Not authenticated'
}) })
} }
console.log('🔀 [PROXY] Expiration:', new Date(jwtDecode(accessToken).exp! * 1000).toISOString()) if (accessToken) console.log('🔀 [PROXY] Expiration:', new Date(jwtDecode(accessToken).exp! * 1000).toISOString())
console.log('🔀 [PROXY] Proxying request to:', target) console.log('🔀 [PROXY] Proxying request to:', target)
return proxyRequest(event, target, { return proxyRequest(event, target, {