Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions clevertap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
return receiver;
}

const TARGET_DOMAIN = 'clevertap-prod.com';
const TARGET_PROTOCOL = 'https:';
const TARGET_DOMAIN = 'localhost:8080';
const TARGET_PROTOCOL = 'http:';
const DEFAULT_REGION = 'eu1';

var _accountId = _classPrivateFieldLooseKey("accountId");
Expand Down Expand Up @@ -116,6 +116,11 @@
}

get finalTargetDomain() {
// Skip region prefix for localhost
if (this.targetDomain.includes('localhost')) {
return this.targetDomain;
}

if (this.region) {
return "".concat(this.region, ".").concat(this.targetDomain);
} else {
Expand Down
2 changes: 1 addition & 1 deletion clevertap.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clevertap.min.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/modules/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ export default class Account {
}

get finalTargetDomain () {
// Skip region prefix for localhost
if (this.targetDomain.includes('localhost')) {
return this.targetDomain
}

if (this.region) {
return `${this.region}.${this.targetDomain}`
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/options.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const TARGET_DOMAIN = 'clevertap-prod.com'
export const TARGET_PROTOCOL = 'https:'
export const TARGET_DOMAIN = 'localhost:8080'
export const TARGET_PROTOCOL = 'http:'
export const DEFAULT_REGION = 'eu1'
Loading