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

@@ -12,14 +12,14 @@ export default defineEventHandler(async (event: H3Event) => {
const session = await getUserSession(event)
const accessToken = session?.jwt?.accessToken
if (!accessToken) {
if (!accessToken && event.path !== '/api/actuator/health') {
throw createError({
statusCode: 401,
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)
return proxyRequest(event, target, {