fix(netlify-cms-backend-git-gateway): content-type may have charset (#1951)

This commit is contained in:
Steve Lathrop 2018-12-11 11:24:32 -05:00 committed by Shawn Erquhart
parent cbb7762883
commit c74dbae590

View File

@ -92,7 +92,7 @@ export default class GitGateway {
},
).then(async res => {
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(
`Your Git Gateway backend is not returning valid settings. Please make sure it is enabled.`,
res.status,