properly deal with cache-control for onedrive
This commit is contained in:
parent
9ddb840077
commit
dbf80c3359
@ -461,7 +461,6 @@ export class WrappedOnedriveClient {
|
|||||||
body: JSON.stringify(payload),
|
body: JSON.stringify(payload),
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
|
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
|
||||||
"Cache-Control": "no-cache",
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@ -478,7 +477,6 @@ export class WrappedOnedriveClient {
|
|||||||
body: JSON.stringify(payload),
|
body: JSON.stringify(payload),
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
|
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
|
||||||
"Cache-Control": "no-cache",
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@ -493,7 +491,6 @@ export class WrappedOnedriveClient {
|
|||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
|
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
|
||||||
"Cache-Control": "no-cache",
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -501,7 +498,6 @@ export class WrappedOnedriveClient {
|
|||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
|
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
|
||||||
"Cache-Control": "no-cache",
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -522,7 +518,6 @@ export class WrappedOnedriveClient {
|
|||||||
headers: {
|
headers: {
|
||||||
"Content-Type": DEFAULT_CONTENT_TYPE,
|
"Content-Type": DEFAULT_CONTENT_TYPE,
|
||||||
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
|
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
|
||||||
"Cache-Control": "no-cache",
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -532,7 +527,6 @@ export class WrappedOnedriveClient {
|
|||||||
headers: {
|
headers: {
|
||||||
"Content-Type": DEFAULT_CONTENT_TYPE,
|
"Content-Type": DEFAULT_CONTENT_TYPE,
|
||||||
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
|
Authorization: `Bearer ${await this.authGetter.getAccessToken()}`,
|
||||||
"Cache-Control": "no-cache",
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -826,12 +820,9 @@ const downloadFromRemoteRaw = async (
|
|||||||
).arrayBuffer;
|
).arrayBuffer;
|
||||||
return content;
|
return content;
|
||||||
} else {
|
} else {
|
||||||
const content = await (
|
const content = await // cannot set no-cache here, will have cors error
|
||||||
await fetch(downloadUrl, {
|
(
|
||||||
headers: {
|
await fetch(downloadUrl)
|
||||||
"Cache-Control": "no-cache",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
).arrayBuffer();
|
).arrayBuffer();
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user