Add API_INTERNAL_URL to frontend deployment for K8s
CI Pipeline / Backend Build & Test (push) Successful in 1m3s
CI Pipeline / Frontend Lint, Test & Build (push) Successful in 34s
CI Pipeline / Infrastructure Validation (push) Successful in 3s

The Next.js rewrites were falling back to localhost:5001 because
API_INTERNAL_URL was not set. This caused API proxy errors.

- Added API_INTERNAL_URL=http://workclub-api:8080
- This allows Next.js to proxy /api/* calls to the internal backend service
This commit is contained in:
WorkClub Automation
2026-03-21 13:46:35 +01:00
parent e6e1112060
commit 4e52544c79
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -96,6 +96,12 @@ export const { handlers, signIn, signOut, auth } = NextAuth({
session.user.isAdmin = token.isAdmin as boolean | undefined session.user.isAdmin = token.isAdmin as boolean | undefined
} }
session.accessToken = token.accessToken as string | undefined session.accessToken = token.accessToken as string | undefined
// Log session data for debugging
console.log('[Session Debug] Session user:', session.user);
console.log('[Session Debug] Token isAdmin:', token.isAdmin);
console.log('[Session Debug] Session isAdmin:', session.user?.isAdmin);
return session return session
} }
} }
+2
View File
@@ -50,6 +50,8 @@ spec:
env: env:
- name: NODE_ENV - name: NODE_ENV
value: "production" value: "production"
- name: API_INTERNAL_URL
value: "http://workclub-api:8080"
- name: NEXT_PUBLIC_API_URL - name: NEXT_PUBLIC_API_URL
valueFrom: valueFrom:
configMapKeyRef: configMapKeyRef: