Skip to content

Commit 3c4c73b

Browse files
committed
skip query indexes
1 parent 941f3a5 commit 3c4c73b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/import/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ async function importUrl(url) {
4444
url.fromOrg ??= fromOrg;
4545

4646
const { pathname, href } = url;
47-
if (href.endsWith('.xml') || href.endsWith('.html')) {
47+
if (href.endsWith('.xml') || href.endsWith('.html') || href.includes('query-index')) {
4848
url.status = 'error';
49-
url.error = 'DA does not support XML or raw HTML.';
49+
url.error = 'DA does not support XML, HTML, or query index files.';
5050
return;
5151
}
5252

@@ -66,7 +66,7 @@ async function importUrl(url) {
6666
try {
6767
const resp = await fetch(`${url.origin}${srcPath}`);
6868
console.log("fetched resource from AEM at: ", `${url.origin}${srcPath}`)
69-
if (resp.redirected && !srcPath.endsWith('.mp4')) {
69+
if (resp.redirected && !(srcPath.endsWith('.mp4') || srcPath.endsWith('.png') || srcPath.endsWith('.jpg'))) {
7070
url.status = 'redir';
7171
throw new Error('redir');
7272
}

0 commit comments

Comments
 (0)