Skip to content

Commit 6ee5164

Browse files
wilkerlucioblazzy
authored andcommitted
Move final url slash to config so endpoints may end without a slash (#175)
1 parent f69dfbb commit 6ee5164

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/amplitude-client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ AmplitudeClient.prototype.sendEvents = function sendEvents(callback) {
12621262

12631263
this._sending = true;
12641264
var protocol = this.options.forceHttps ? 'https' : ('https:' === window.location.protocol ? 'https' : 'http');
1265-
var url = protocol + '://' + this.options.apiEndpoint + '/';
1265+
var url = protocol + '://' + this.options.apiEndpoint;
12661266

12671267
// fetch events to send
12681268
var numEvents = Math.min(this._unsentCount(), this.options.uploadBatchSize);

src/options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import language from './language';
22

33
// default options
44
export default {
5-
apiEndpoint: 'api.amplitude.com',
5+
apiEndpoint: 'api.amplitude.com/',
66
batchEvents: false,
77
cookieExpiration: 365 * 10,
88
cookieName: 'amplitude_id',

0 commit comments

Comments
 (0)