From e9ad666ea51f943414f6aa560ac85653b3e5398f Mon Sep 17 00:00:00 2001 From: Robert Bogos Date: Wed, 12 Jun 2024 09:30:41 +0300 Subject: [PATCH] extended non prod hostname check --- blog/scripts/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/scripts/utils.js b/blog/scripts/utils.js index 1ae323e..cf261f4 100644 --- a/blog/scripts/utils.js +++ b/blog/scripts/utils.js @@ -19,7 +19,7 @@ export const [setLibs, getLibs] = (() => { (prodLibs, location) => { libs = (() => { const { hostname, search } = location || window.location; - if (!(hostname.includes('.hlx.') || hostname.includes('local'))) return prodLibs; + if (!['.hlx.', '.stage.', 'local'].some((i) => hostname.includes(i))) return prodLibs; const branch = new URLSearchParams(search).get('milolibs') || 'main'; if (branch === 'local') return 'http://localhost:6456/libs'; return branch.includes('--') ? `https://${branch}.hlx.live/libs` : `https://${branch}--milo--adobecom.hlx.live/libs`;