Skip to content

Commit

Permalink
Fix a ws url build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdong262 committed Jan 24, 2025
1 parent 360c778 commit 6dbfd35
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "electerm-web",
"version": "2.60.19",
"version": "2.60.20",
"description": "Running electerm in as web app",
"main": "src/app/app.js",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion src/client/entry-web/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function createWs (
const s = ss
? ss.replace(/https?:\/\//, '').replace(/\/$/, '')
: `${host}:${port}`
const pre = server.startsWith('https') ? 'wss' : 'ws'
const pre = ss.startsWith('https') ? 'wss' : 'ws'
const wsUrl = `${pre}://${s}/${type}/${id}?sessionId=${sessionId}&sftpId=${sftpId}&token=${tokenElecterm}`
const ws = new WebSocket(wsUrl)
ws.s = msg => {
Expand Down

0 comments on commit 6dbfd35

Please sign in to comment.