Skip to content

Commit 2f2a27e

Browse files
authored
Merge pull request #32 from bringg/remove-xhr-transport
Remove XHR support when connecting to socket.io
2 parents d2be172 + d8eedab commit 2f2a27e

File tree

4 files changed

+15
-20
lines changed

4 files changed

+15
-20
lines changed

BringgSDK.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ var BringgSDK = (function () {
3939
'END_POINT': REAL_TIME_PRODUCTION,
4040
'SECURED_SOCKETS': true,
4141
'SOCKET_WEBSOCKET_PORT': 443,
42-
'SOCKET_XHR_PORT': 8443
4342
};
4443

4544
module._getRealtimeOptions = function() {
@@ -675,12 +674,6 @@ var BringgSDK = (function () {
675674
: REAL_TIME_OPTIONS.SOCKET_WEBSOCKET_PORT;
676675
}
677676

678-
function getXHRPort() {
679-
return window.SOCKET_XHR_PORT ? window.SOCKET_XHR_PORT
680-
: isLocal() ? '3030'
681-
: REAL_TIME_OPTIONS.SOCKET_XHR_PORT;
682-
}
683-
684677
function getSecuredSocketSetup() {
685678
return window.SECURED_SOCKETS ? window.SECURED_SOCKETS
686679
: isLocal() ? false
@@ -784,8 +777,7 @@ var BringgSDK = (function () {
784777

785778
module._socket = io(getRealTimeEndPoint(), {
786779
transports: [
787-
{name: 'websocket', options: {port: getWebSocketPort(), secure: getSecuredSocketSetup()}},
788-
{name: 'polling', options: {port: getXHRPort(), secure: getSecuredSocketSetup()}}
780+
{name: 'websocket', options: {port: getWebSocketPort(), secure: getSecuredSocketSetup()}}
789781
]
790782
});
791783

Dockerfile.ci

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
FROM node:slim
1+
FROM bringg/node:16-slim
2+
3+
ENV OPENSSL_CONF=/etc/ssl
4+
25
RUN apt-get update \
3-
&& apt-get install -y --no-install-recommends bzip2 git libfontconfig \
4-
&& npm install -g bower grunt-cli
6+
&& apt-get install -y --no-install-recommends bzip2 git libfontconfig ca-certificates \
7+
&& npm install -g bower

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"jquery": "~2.1.4"
1010
},
1111
"devDependencies": {
12-
"faker.js": "https://github.com/Marak/faker.js.git#v3.0.1"
12+
"faker.js": "faker-js/faker#^4.1.0"
1313
}
1414
}

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"codecov": "codecov"
77
},
88
"devDependencies": {
9-
"codecov": "^3.6.5",
10-
"jasmine-core": "^2.5.2",
11-
"karma": "^1.3.0",
12-
"karma-chrome-launcher": "^2.0.0",
13-
"karma-coverage": "^1.1.1",
14-
"karma-jasmine": "^1.1.0",
15-
"karma-junit-reporter": "^1.2.0",
9+
"codecov": "^3.8.3",
10+
"jasmine-core": "^4.0.1",
11+
"karma": "^6.3.17",
12+
"karma-chrome-launcher": "^3.1.1",
13+
"karma-coverage": "^2.2.0",
14+
"karma-jasmine": "^4.0.1",
15+
"karma-junit-reporter": "^2.0.1",
1616
"karma-mocha-reporter": "^2.2.1",
1717
"karma-notify-reporter": "^1.0.1",
1818
"karma-phantomjs-launcher": "^1.0.2"

0 commit comments

Comments
 (0)