feat: Enable server health again
This commit is contained in:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user