Skip to content

Commit

Permalink
make regex include branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Marquise Rosier committed Feb 2, 2024
1 parent bc8c6e8 commit 8328ed9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions head.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">

<script async type="text/javascript">
if (location.hostname.startsWith('main') && (new RegExp('hlx\\.live$').test(location.hostname) || new RegExp('hlx\\.page$').test(location.hostname))) {
if ((new RegExp('hlx\\.live$').test(location.hostname) || new RegExp('hlx\\.page$').test(location.hostname))) {
const queryParams = new URLSearchParams(location.search);
const newQp = new URLSearchParams();
const qpList = ['domainkey', 'url'];
Expand All @@ -20,9 +20,9 @@
});

if (requiredQueryParamsFlag) {
location.href = `https://data.aem.live/rum-dashboard?+${newQp.toString()}`;
location.href = `https://${location.hostname}/rum-dashboard?+${newQp.toString()}`;
} else {
location.href = 'https://data.aem.live';
location.href = `https://${location.hostname}`;
}
}
</script>
Expand Down

0 comments on commit 8328ed9

Please sign in to comment.