fix(client event handler): future lenience
This commit is contained in:
parent
cada630e81
commit
5c78b20504
1 changed files with 2 additions and 2 deletions
|
|
@ -35,8 +35,8 @@ export function defineClientEventHandler<T>(handler: EventHandlerFunction<T>) {
|
|||
const nonceTime = parseInt(nonce);
|
||||
const current = Date.now();
|
||||
if (
|
||||
// If it was generated in the future
|
||||
nonceTime > current ||
|
||||
// If it "will be generated" in thirty seconds
|
||||
nonceTime > current + NONCE_LENIENCE ||
|
||||
// Or more than thirty seconds ago
|
||||
nonceTime < current - NONCE_LENIENCE
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue