Skip to content

Commit

Permalink
Fiks dårlig regex som ikke funker i prod
Browse files Browse the repository at this point in the history
  • Loading branch information
LudvigHz committed Sep 6, 2024
1 parent 1ae48b0 commit 3bb2680
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ export const getEnvFromHost = () => {
};

export const getDomainFromHost = (): 'ANSATT' | 'NAV_NO' | 'LOCAL' => {
const matchAnsatt = window.location.host.match(/\.ansatt\.(dev)?\.nav\.no/);
const matchAnsatt = window.location.host.match(/\.ansatt(\.dev)?\.nav\.no/);
if (matchAnsatt) return 'ANSATT';

const matchIntern = window.location.host.match(/\.intern\.(dev)?\.nav\.no/);
const matchIntern = window.location.host.match(/\.intern(\.dev)?\.nav\.no/);
if (matchIntern) return 'NAV_NO';

return 'LOCAL';
Expand Down

0 comments on commit 3bb2680

Please sign in to comment.