add no-cache for dropbox
This commit is contained in:
parent
f6f7d83a35
commit
d3d26bfe49
@ -371,9 +371,13 @@ export class WrappedDropboxClient {
|
||||
throw Error("The user has not manually auth yet.");
|
||||
}
|
||||
const currentTs = Date.now();
|
||||
const customHeaders = {
|
||||
"Cache-Control": "no-cache",
|
||||
};
|
||||
if (this.dropboxConfig.accessTokenExpiresAtTime > currentTs) {
|
||||
this.dropbox = new Dropbox({
|
||||
accessToken: this.dropboxConfig.accessToken,
|
||||
customHeaders: customHeaders,
|
||||
});
|
||||
} else {
|
||||
if (this.dropboxConfig.refreshToken === "") {
|
||||
@ -393,6 +397,7 @@ export class WrappedDropboxClient {
|
||||
);
|
||||
this.dropbox = new Dropbox({
|
||||
accessToken: this.dropboxConfig.accessToken,
|
||||
customHeaders: customHeaders,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user