Skip to content

Commit

Permalink
Enforce specific sockjs and sockjs-client version.
Browse files Browse the repository at this point in the history
Ref #474
  • Loading branch information
SpaceK33z committed Sep 6, 2016
1 parent d21148b commit 0de52b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var https = require("https");
var httpProxyMiddleware = require("http-proxy-middleware");
var serveIndex = require("serve-index");
var historyApiFallback = require("connect-history-api-fallback");
var pkg = require("../package.json");

function Server(compiler, options) {
// Default options
Expand Down Expand Up @@ -307,6 +308,9 @@ Server.prototype.setContentHeaders = function(req, res, next) {
Server.prototype.listen = function() {
var returnValue = this.listeningApp.listen.apply(this.listeningApp, arguments);
var sockServer = sockjs.createServer({
// The SockJS server package uses a version of the client script
// that doesn't match our version of the client script.
sockjs_url: 'https://cdn.jsdelivr.net/sockjs/' + pkg.dependencies['sockjs-client'] + '/sockjs.min.js',
// Limit useless logs
log: function(severity, line) {
if(severity === "error") {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"http-proxy-middleware": "~0.17.1",
"opn": "4.0.2",
"serve-index": "^1.7.2",
"sockjs": "^0.3.15",
"sockjs-client": "^1.0.3",
"sockjs": "0.3.17",
"sockjs-client": "1.1.1",
"stream-cache": "~0.0.1",
"strip-ansi": "^3.0.0",
"supports-color": "^3.1.1",
Expand Down

0 comments on commit 0de52b2

Please sign in to comment.