Skip to content

Commit 08a5ce1

Browse files
committed
fix socket path
1 parent df63111 commit 08a5ce1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

public/js/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
var host = window.location.hostname;
22
var port = window.location.port;
33
var protocol = window.location.protocol;
4-
var socket = io(protocol + '//' + host + ':' + port, {});
4+
var path = window.location.pathname;
5+
var socket = io(protocol + '//' + host + ':' + port, { path: path + 'socket.io'});
56

67
//// Socket recieves ////
78
// Render config
@@ -286,6 +287,9 @@ function renderFileDirs(dirs) {
286287
function renderFileBrowser(dir) {
287288
$('#main').empty();
288289
var url = window.location.href;
290+
if (! url.endsWith('/')) {
291+
var url = url + '/';
292+
};
289293
var browser = $('<iframe>').attr('src', url + 'files/fs/' + dir).addClass('browser');
290294
$('#main').append(browser);
291295
};

0 commit comments

Comments
 (0)