Skip to content

Commit

Permalink
extended non prod hostname check (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-bogos authored Jun 20, 2024
1 parent a8c0206 commit 7dbed17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blog/scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
Expand Down

0 comments on commit 7dbed17

Please sign in to comment.