diff --git a/nais/dev-gcp/nais.yaml b/nais/dev-gcp/nais.yaml index 24e35df..9e5ac5c 100644 --- a/nais/dev-gcp/nais.yaml +++ b/nais/dev-gcp/nais.yaml @@ -24,6 +24,7 @@ spec: max: 4 ingresses: - "https://www.intern.dev.nav.no/tms-tidligere-varsler-mikrofrontend" + - "https://www.ansatt.dev.nav.no/tms-tidligere-varsler-mikrofrontend" resources: limits: cpu: "3" diff --git a/src/api/urls.ts b/src/api/urls.ts index 2fe503e..72ca34b 100644 --- a/src/api/urls.ts +++ b/src/api/urls.ts @@ -1,5 +1,6 @@ const isProduction = window.location.href.includes("www.nav.no"); -const isDevelopment = window.location.href.includes("www.intern.dev.nav.no"); +const isDevelopment = + window.location.href.includes("www.intern.dev.nav.no") || window.location.href.includes("www.ansatt.dev.nav.no"); export const getEnvironment = () => { if (isDevelopment) { @@ -15,17 +16,16 @@ export const getEnvironment = () => { const TMS_VARSEL_API = { local: "http://localhost:3000/api/tms-varsel-api", - development: "https://www.intern.dev.nav.no/tms-varsel-api", + development: `${window.location.origin}/tms-varsel-api`, production: "https://www.nav.no/tms-varsel-api", }; const MIN_SIDE_URL = { local: "http://localhost:3000/minside", - development: "https://www.intern.dev.nav.no/minside", + development: `${window.location.origin}/minside`, production: "https://www.nav.no/minside", }; const tmsVarselAPI = TMS_VARSEL_API[getEnvironment()]; export const minSideUrl = MIN_SIDE_URL[getEnvironment()]; export const inaktiveVarslerApiUrl = `${tmsVarselAPI}/inaktive`; -export const tidligereVarslerUrl = `${minSideUrl}/varslinger`;