Skip to content

Commit

Permalink
include credentials in xhr
Browse files Browse the repository at this point in the history
  • Loading branch information
swaathee committed Feb 11, 2021
1 parent b71b601 commit 43fe862
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/clarity-js/src/data/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function send(payload: string, sequence: number, last: boolean): void {
if (dispatched === false) {
if (sequence in transit) { transit[sequence].attempts++; } else { transit[sequence] = { data: payload, attempts: 1 }; }
let xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.open("POST", url);
if (sequence !== null) { xhr.onreadystatechange = (): void => { measure(check)(xhr, sequence, last); }; }
xhr.send(payload);
Expand Down

0 comments on commit 43fe862

Please sign in to comment.