fix: websockify path (#153)
This commit is contained in:
parent
b9254682c1
commit
f176f2d5fd
|
@ -37,7 +37,8 @@
|
|||
// change the path depending on window.location (necessary for websockets to work on Coder's application path
|
||||
// ex. /api/v0/workspaces/[id]/proxy/apps/desktop/)
|
||||
path = window.location.pathname;
|
||||
path = path.replace(/\/$/, "") + "/websockify";
|
||||
path = path.replace(/^\/|\/$/g, "");
|
||||
path = path + "/websockify";
|
||||
console.log(path);
|
||||
} else {
|
||||
console.error("window.location.pathname is undefined");
|
||||
|
|
Loading…
Reference in New Issue