Fix content type for file requests
This commit is contained in:
parent
964e158a5f
commit
769d2bd284
@ -100,7 +100,7 @@ export default class API {
|
|||||||
if (cached && cached.expires > Date.now()) { return cached.data; }
|
if (cached && cached.expires > Date.now()) { return cached.data; }
|
||||||
|
|
||||||
return this.request(`${this.repoURL}/files/${key}.json?ref=refs/meta/_netlify_cms`, {
|
return this.request(`${this.repoURL}/files/${key}.json?ref=refs/meta/_netlify_cms`, {
|
||||||
headers: { Accept: 'application/vnd.github.VERSION.raw' },
|
headers: { 'Content-Type': 'application/vnd.netlify.raw' },
|
||||||
cache: 'no-store',
|
cache: 'no-store',
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
LocalForage.setItem(`gh.meta.${key}`, {
|
LocalForage.setItem(`gh.meta.${key}`, {
|
||||||
@ -118,7 +118,7 @@ export default class API {
|
|||||||
if (cached) { return cached; }
|
if (cached) { return cached; }
|
||||||
|
|
||||||
return this.request(`${this.repoURL}/files/${path}`, {
|
return this.request(`${this.repoURL}/files/${path}`, {
|
||||||
headers: { Accept: 'application/vnd.github.VERSION.raw' },
|
headers: { 'Content-Type': 'application/vnd.netlify.raw' },
|
||||||
params: { ref: this.branch },
|
params: { ref: this.branch },
|
||||||
cache: false,
|
cache: false,
|
||||||
raw: true
|
raw: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user