fix(netlify-cms-backend-git-gateway): content-type may have charset (#1951)
This commit is contained in:
parent
cbb7762883
commit
c74dbae590
@ -92,7 +92,7 @@ export default class GitGateway {
|
|||||||
},
|
},
|
||||||
).then(async res => {
|
).then(async res => {
|
||||||
const contentType = res.headers.get('Content-Type');
|
const contentType = res.headers.get('Content-Type');
|
||||||
if (contentType !== 'application/json' && contentType !== 'text/json') {
|
if (!contentType.includes('application/json') && !contentType.includes('text/json')) {
|
||||||
throw new APIError(
|
throw new APIError(
|
||||||
`Your Git Gateway backend is not returning valid settings. Please make sure it is enabled.`,
|
`Your Git Gateway backend is not returning valid settings. Please make sure it is enabled.`,
|
||||||
res.status,
|
res.status,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user