fix: reject HTML resource indexes

This commit is contained in:
Lain Soykaf 2026-08-12 08:18:18 +00:00
commit 13394befaf
2 changed files with 41 additions and 2 deletions

View file

@ -348,7 +348,11 @@ export const getResourcesIndex = async (url, parser = noop) => {
}
try {
const { data: builtinData } = await promisedRequest({ url, cache })
const { data: builtinData } = await promisedRequest({
url,
cache,
forceContentType: 'application/json',
})
builtin = resourceTransform(builtinData)
} catch {
builtin = []
@ -359,6 +363,7 @@ export const getResourcesIndex = async (url, parser = noop) => {
const { data: customData } = await promisedRequest({
url: customUrl,
cache,
forceContentType: 'application/json',
})
custom = resourceTransform(customData)
} catch {