diff --git a/tests/sockjs_server.js b/tests/sockjs_server.js
index <HASH>..<HASH> 100644
--- a/tests/sockjs_server.js
+++ b/tests/sockjs_server.js
@@ -60,7 +60,7 @@ server.addListener('upgrade', function(req, res){
 });
 
 sockjs_app.install({
-  sockjs_url: 'http://localhost:'+port+'/lib/sockjs.js',
+  sockjs_url: '/lib/sockjs.js',
   websocket: true
 }, server);
Fix tests when not running on localhost