Skip to content

Commit 625b94b

Browse files
committed
use math.random instead of new Date to avoid any collision
1 parent 639abd2 commit 625b94b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const generateSignatureToken = (
6666
var xhr = new XMLHttpRequest();
6767
xhr.timeout = 60000;
6868
var urlObj = new URL(authenticationEndpoint);
69-
urlObj.searchParams.set("t", new Date().getTime().toString());
69+
urlObj.searchParams.set("t", Math.random().toString());
7070
xhr.open('GET', urlObj.toString());
7171
xhr.ontimeout = function (e) {
7272
return reject(errorMessages.AUTH_ENDPOINT_TIMEOUT);

0 commit comments

Comments
 (0)