Skip to content

Commit

Permalink
extended non prod hostname check
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-bogos committed Jun 12, 2024
1 parent f1c8647 commit e9ad666
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 e9ad666

Please sign in to comment.