mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Added basePath option.
This commit is contained in:
@@ -35,7 +35,8 @@ function Socket (opts) {
|
||||
this.query = opts.query || {};
|
||||
this.query.uid = rnd();
|
||||
this.upgrade = false !== opts.upgrade;
|
||||
this.path = opts.path || '/engine.io'
|
||||
this.basePath = opts.basePath || '/engine.io';
|
||||
this.path = opts.path || '';
|
||||
this.forceJSONP = !!opts.forceJSONP;
|
||||
this.flashPath = opts.flashPath || '';
|
||||
this.transports = opts.transports || ['polling', 'websocket', 'flashsocket'];
|
||||
@@ -71,7 +72,7 @@ Socket.prototype.createTransport = function (name) {
|
||||
host: this.host
|
||||
, port: this.port
|
||||
, secure: this.secure
|
||||
, path: this.path
|
||||
, path: this.basePath + this.path
|
||||
, query: query
|
||||
, forceJSONP: this.forceJSONP
|
||||
, flashPath: this.flashPath
|
||||
|
||||
Reference in New Issue
Block a user