Skip to content

Commit

Permalink
Faktisk bruk contextholder-next ved featuretoggle
Browse files Browse the repository at this point in the history
  • Loading branch information
LudvigHz committed Sep 25, 2024
1 parent 45597c3 commit dc77df0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions proxy-config-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"url": "http://modiacontextholder.personoversikt.svc.cluster.local",
"scope": "api://dev-gcp.personoversikt.modiacontextholder/.default"
},
"modiacontextholder-next": {
"url": "http://modiacontextholder-next.personoversikt.svc.cluster.local",
"scope": "api://dev-gcp.personoversikt.modiacontextholder-next/.default"
},
"azure-api": {
"url": "http://modiapersonoversikt-api.personoversikt.svc.cluster.local/modiapersonoversikt-api/rest",
"scope": "api://dev-gcp.personoversikt.modiapersonoversikt-api/.default"
Expand Down
6 changes: 2 additions & 4 deletions src/app/internarbeidsflatedecorator/useDecoratorConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function lagConfigV3(
const urlFormat = getDomainFromHost();

const brukNyContext = getWindowFeature('contextholderNext');
const contextProxy = brukNyContext ? 'modiacontextholder-next' : 'modiacontextholder';

return {
appName: 'Modia personoversikt',
Expand All @@ -106,10 +107,7 @@ function lagConfigV3(
},
hotkeys: getHotkeys(),
enableHotkeys: true,
proxy: import.meta.env.PROD
? `https://${window.location.host}${import.meta.env.BASE_URL}proxy/modiacontextholder`
: ((import.meta.env.VITE_CONTEXTHOLDER_URL as string) ??
`${import.meta.env.BASE_URL}proxy/modiacontextholder`),
proxy: (import.meta.env.VITE_CONTEXTHOLDER_URL as string) ?? `${import.meta.env.BASE_URL}proxy/${contextProxy}`,
environment,
urlFormat: import.meta.env.PROD ? urlFormat : 'LOCAL',
websocketUrl: brukNyContext ? 'wss://modiacontextholder-next.intern.dev.nav.no/ws/' : undefined,
Expand Down

0 comments on commit dc77df0

Please sign in to comment.