Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions acrobat/blocks/unity/unity.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function getUnityLibs(prodLibs = '/unitylibs') {
if (!/\.hlx\.|\.aem\.|local|stage/.test(hostname)) return prodLibs;
// eslint-disable-next-line compat/compat
const branch = new URLSearchParams(search).get('unitylibs') || 'main';
if (!/^[a-zA-Z0-9_-]+$/.test(branch)) throw new Error('Invalid branch name.');
if (branch === 'main' && hostname === 'www.stage.adobe.com') return prodLibs;
const env = hostname.includes('.aem.') ? 'aem' : 'hlx';
return `https://${branch}${branch.includes('--') ? '' : '--unity--adobecom'}.${env}.live/unitylibs`;
Expand Down
1 change: 1 addition & 0 deletions acrobat/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const setLibs = (prodLibs, location = window.location) => {
if (!/\.hlx\.|\.aem\.|local|stage/.test(hostname)) return prodLibs;
// eslint-disable-next-line compat/compat
const branch = new URLSearchParams(search).get('milolibs') || 'main';
if (!/^[a-zA-Z0-9_-]+$/.test(branch)) throw new Error('Invalid branch name.');
if (branch === 'main' && hostname === 'www.stage.adobe.com') return '/libs';
if (branch === 'local') return 'http://localhost:6456/libs';
return `https://${branch}${branch.includes('--') ? '' : '--milo--adobecom'}.aem.live/libs`;
Expand Down
1 change: 1 addition & 0 deletions acrobat/scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const [setLibs, getLibs] = (() => {
if (!/\.hlx\.|\.aem\.|local|stage/.test(hostname)) return prodLibs;
// eslint-disable-next-line compat/compat
const branch = new URLSearchParams(search).get('milolibs') || 'main';
if (!/^[a-zA-Z0-9_-]+$/.test(branch)) throw new Error('Invalid branch name.');
if (branch === 'main' && hostname === 'www.stage.adobe.com') return '/libs';
if (branch === 'local') return 'http://localhost:6456/libs';
return `https://${branch}${branch.includes('--') ? '' : '--milo--adobecom'}.aem.live/libs`;
Expand Down
2 changes: 2 additions & 0 deletions head.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
const { hostname, search } = location;
if (!/\.hlx\.|\.aem\.|local|stage/.test(hostname)) return prodLibs;
const branch = new URLSearchParams(search).get('milolibs') || 'main';
if (!/^[a-zA-Z0-9_-]+$/.test(branch)) throw new Error('Invalid branch name.');
if (branch === 'main' && hostname === 'www.stage.adobe.com') return '/libs';
if (branch === 'local') return 'http://localhost:6456/libs';
const env = hostname.includes('.hlx.') ? 'hlx' : 'aem';
Expand All @@ -19,6 +20,7 @@
const { hostname, search } = window.location;
if (!/\.hlx\.|\.aem\.|local|stage/.test(hostname)) return prodLibs;
const branch = new URLSearchParams(search).get('unitylibs') || 'main';
if (!/^[a-zA-Z0-9_-]+$/.test(branch)) throw new Error('Invalid branch name.');
if (branch === 'main' && hostname === 'www.stage.adobe.com') return prodLibs;
const env = hostname.includes('.hlx.') ? 'hlx' : 'aem';
return `https://${branch}${branch.includes('--')? '' : '--unity--adobecom'}.${env}.live/unitylibs`;
Expand Down
Loading