diff --git a/.env.development.local b/.env.development.local deleted file mode 100644 index b13d656..0000000 --- a/.env.development.local +++ /dev/null @@ -1,11 +0,0 @@ -NEXT_PUBLIC_RUNTIME_ENVIRONMENT=local - -MEROPPFOLGING_BACKEND_URL="dummy-value" -FLEXJAR_BACKEND_HOST="dummy-value" -FLEXJAR_BACKEND_CLIENT_ID="dummy-value" -TOKEN_X_WELL_KNOWN_URL="dummy-value" -TOKEN_X_CLIENT_ID="dummy-value" -TOKEN_X_PRIVATE_JWK="dummy-value" -IDPORTEN_WELL_KNOWN_URL="dummy-value" -IDPORTEN_CLIENT_ID="dummy-value" -NAIS_CLUSTER_NAME="dummy-value" diff --git a/.env.local b/.env.local new file mode 100644 index 0000000..61a5e46 --- /dev/null +++ b/.env.local @@ -0,0 +1 @@ +NEXT_PUBLIC_RUNTIME_ENVIRONMENT=local diff --git a/nais/nais-prod.yaml b/nais/nais-prod.yaml index 86506be..f8058fe 100644 --- a/nais/nais-prod.yaml +++ b/nais/nais-prod.yaml @@ -53,7 +53,7 @@ spec: cpu: 200m memory: 256Mi ingresses: - - 'https://www.ekstern.dev.nav.no/syk/kartleggingssporsmal' + - 'https://www.nav.no/syk/kartleggingssporsmal' env: - name: MEROPPFOLGING_BACKEND_URL value: http://meroppfolging-backend diff --git a/src/app/page.tsx b/src/app/page.tsx index 8951ebb..c364b2c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,8 +1,6 @@ import { fetchKandidatStatus } from '@/services/meroppfolging/meroppfolgingService' import KartleggingssporsmalLanding from '@/features/kartleggingssporsmal/KartleggingssporsmalLanding' -export const dynamic = 'force-dynamic' - export default async function Home() { const kandidatStatus = await fetchKandidatStatus() diff --git a/src/services/meroppfolging/meroppfolgingService.ts b/src/services/meroppfolging/meroppfolgingService.ts index 010546e..5938744 100644 --- a/src/services/meroppfolging/meroppfolgingService.ts +++ b/src/services/meroppfolging/meroppfolgingService.ts @@ -18,12 +18,12 @@ export async function fetchKandidatStatus(): Promise { } } - const { MEROPPFOLGING_BACKEND_URL } = getServerEnv() - const url = new URL('/api/v1/kartleggingssporsmal/kandidat-status', MEROPPFOLGING_BACKEND_URL) - const idportenToken = await verifyUserLoggedIn() const exchangedToken = await exchangeIdportenTokenForMeroppfolgingBackendTokenx(idportenToken) + const { MEROPPFOLGING_BACKEND_URL } = getServerEnv() + const url = new URL('/api/v1/kartleggingssporsmal/kandidat-status', MEROPPFOLGING_BACKEND_URL) + try { const res = await fetch(url, { method: 'GET',