fix: reject HTML resource indexes
This commit is contained in:
parent
35ea3a97dc
commit
13394befaf
2 changed files with 41 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue