Skip to content

Commit

Permalink
Merge pull request #2573 from Amsterdam/bugfix/loading-keycloak
Browse files Browse the repository at this point in the history
Remove conditionally loading config/env
  • Loading branch information
remyvdwereld authored Jul 23, 2024
2 parents 1200a0e + 5e04293 commit 7fb4f15
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,8 @@
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<base href="/">
<title>%REACT_APP_PAGE_TITLE%</title>
<script src='/config/env.js'></script>
<script type="module" src="src/index"></script>
<script>
// Check if the hostname contains "localhost" or is an IP address commonly used for localhost

if (window.location.host === 'localhost:2999') {
// Do not load the script
console.log('Skipping env.js on localhost.');
} else {
// Load the script
var script = document.createElement('script');
script.src = '/config/env.js';
document.head.appendChild(script);
}
</script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down

0 comments on commit 7fb4f15

Please sign in to comment.