From 4e33b9af043e356effc00d51db861dff05fab73b Mon Sep 17 00:00:00 2001 From: Krishna Rajendran Date: Mon, 20 Nov 2017 15:58:12 -0800 Subject: [PATCH 1/2] Default forceHtttps to true --- src/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/options.js b/src/options.js index cdcc51e9..fecc607d 100644 --- a/src/options.js +++ b/src/options.js @@ -21,7 +21,7 @@ export default { batchEvents: false, eventUploadThreshold: 30, eventUploadPeriodMillis: 30 * 1000, // 30s - forceHttps: false, + forceHttps: true, includeGclid: false, saveParamsReferrerOncePerSession: true, deviceIdFromUrlParam: false, From 1a33cf18327f32aae9decbbe845c369f6f24f575 Mon Sep 17 00:00:00 2001 From: Krishna Rajendran Date: Mon, 20 Nov 2017 16:16:08 -0800 Subject: [PATCH 2/2] Fix logEvent tests --- test/amplitude-client.js | 1 + test/amplitude.js | 1 + 2 files changed, 2 insertions(+) diff --git a/test/amplitude-client.js b/test/amplitude-client.js index cba135a1..c63f8dde 100644 --- a/test/amplitude-client.js +++ b/test/amplitude-client.js @@ -1069,6 +1069,7 @@ describe('setVersionName', function() { }); it('should send request', function() { + amplitude.options.forceHttps = false; amplitude.logEvent('Event Type 1'); assert.lengthOf(server.requests, 1); assert.equal(server.requests[0].url, 'http://api.amplitude.com/'); diff --git a/test/amplitude.js b/test/amplitude.js index 68ae2e4f..884ef23f 100644 --- a/test/amplitude.js +++ b/test/amplitude.js @@ -1057,6 +1057,7 @@ describe('setVersionName', function() { }); it('should send request', function() { + amplitude.options.forceHttps = false; amplitude.logEvent('Event Type 1'); assert.lengthOf(server.requests, 1); assert.equal(server.requests[0].url, 'http://api.amplitude.com/');