Skip to content

Commit

Permalink
adds check for staging to host
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Rugh <[email protected]>
  • Loading branch information
sirugh committed Sep 16, 2024
1 parent 99f2532 commit ceb2316
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ const ALLOWED_CONFIGS = ['prod', 'stage', 'dev'];
* @returns {string} - environment identifier (dev, stage or prod'.
*/
export const calcEnvironment = () => {
const { href } = window.location;
const { host, href } = window.location;
let environment = 'prod';
if (href.includes('.aem.page')) {
if (href.includes('.aem.page') || host.includes('staging')) {
environment = 'stage';
}
if (href.includes('localhost')) {
Expand Down

0 comments on commit ceb2316

Please sign in to comment.