Skip to content

Commit

Permalink
worker
Browse files Browse the repository at this point in the history
  • Loading branch information
turtledreams committed Apr 23, 2024
1 parent e1232c3 commit 00c5950
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

! Minor breaking change ! For implementations using `salt` the browser compatability is tied to SubtleCrypto's `digest` method support

* Added the `salt` init config flag to add checksums to requests (for secure web context only, no worker support yet)
* Added the `salt` init config flag to add checksums to requests (for secure contexts only)

## 23.12.6

Expand Down
4 changes: 3 additions & 1 deletion modules/CountlyClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ import {
loadCSS,
showLoader,
checkIfLoggingIsOn,
hideLoader
hideLoader,
calculateChecksum
} from "./Utils.js";
import { isBrowser, Countly } from "./Platform.js";

Expand Down Expand Up @@ -4647,6 +4648,7 @@ class CountlyClass {
generateUUID: generateUUID,
sendEventsForced: sendEventsForced,
isUUID: isUUID,
calculateChecksum: calculateChecksum,
isReferrerUsable: isReferrerUsable,
getId: getStoredIdOrGenerateId,
heartBeat: heartBeat,
Expand Down
2 changes: 1 addition & 1 deletion modules/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function prepareParams(params, salt) {
str.push(i + "=" + encodeURIComponent(params[i]));
}
var data = str.join("&");
if (salt && isBrowser) { // no web worker support (yet!)
if (salt) {
return calculateChecksum(data, salt).then(checksum => {
data += "&checksum256=" + checksum;
return data;
Expand Down

0 comments on commit 00c5950

Please sign in to comment.