diff --git a/src/core/configValidators.js b/src/core/configValidators.js index 986bcf829..efa89511c 100644 --- a/src/core/configValidators.js +++ b/src/core/configValidators.js @@ -2,7 +2,7 @@ import { required, validDomain } from "../utils/config-validators"; export default { propertyID: { validate: required }, - collectionDomain: { + edgeDomain: { validate: validDomain, defaultValue: "edgegateway.azurewebsites.net" }, diff --git a/src/core/network/createNetwork.js b/src/core/network/createNetwork.js index e978aabb4..27807a7c6 100644 --- a/src/core/network/createNetwork.js +++ b/src/core/network/createNetwork.js @@ -21,7 +21,7 @@ export default (config, logger, lifecycle, networkStrategy) => { .catch(e => logger.warn(e)); }; - const { collectionDomain, propertyID } = config; + const { edgeDomain, propertyID } = config; return { /** * The object returned from network.newRequest @@ -44,7 +44,7 @@ export default (config, logger, lifecycle, networkStrategy) => { newRequest(isBeacon = false) { const payload = createPayload(); const action = isBeacon ? "collect" : "interact"; - const url = `https://${collectionDomain}/${action}?propertyID=${propertyID}`; + const url = `https://${edgeDomain}/${action}?propertyID=${propertyID}`; const deferred = defer(); const responsePromise = deferred.promise .then(() => diff --git a/test/unit/core/configValidators.spec.js b/test/unit/core/configValidators.spec.js index 16b1b6c0f..138b5d766 100644 --- a/test/unit/core/configValidators.spec.js +++ b/test/unit/core/configValidators.spec.js @@ -19,15 +19,15 @@ describe("configValidators", () => { { propertyID: "myproperty1" }, { propertyID: "myproperty1", - collectionDomain: "stats.firstparty.com" + edgeDomain: "stats.firstparty.com" }, - { propertyID: "myproperty1", collectionDomain: "STATS.FIRSTPARY.COM" } + { propertyID: "myproperty1", edgeDomain: "STATS.FIRSTPARY.COM" } ]; const invalidConfigurations = [ {}, - { propertyID: "myproperty1", collectionDomain: "" }, - { propertyID: "myproperty1", collectionDomain: "stats firstparty.com" } + { propertyID: "myproperty1", edgeDomain: "" }, + { propertyID: "myproperty1", edgeDomain: "stats firstparty.com" } ]; validConfigurations.forEach((config, i) => { diff --git a/test/unit/core/network/createNetwork.spec.js b/test/unit/core/network/createNetwork.spec.js index 11bb31997..afac08ebc 100644 --- a/test/unit/core/network/createNetwork.spec.js +++ b/test/unit/core/network/createNetwork.spec.js @@ -14,7 +14,7 @@ import createNetwork from "../../../../src/core/network/createNetwork"; describe("createNetwork", () => { const config = { - collectionDomain: "alloy.mysite.com", + edgeDomain: "alloy.mysite.com", propertyID: "mypropertyid" };