mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 11:30:12 +08:00
feat: connect terminal service to backend
feat: put terminal service into container refactor: separate main into terminal and websocket feat: create zsh using commander in home feat: pass backendUrl to container feat: pass token to ws server to cmd-hook feat: gen terminal access token for frontend feat: success to connect through traefik fix: handle invalid jwt feat: connect to session container via traefik
This commit is contained in:
1 parent
0b08a9a5d9
commit
5e81db2759
20 files changed
+281
-209
No files matched your search
@@ -39,9 +39,13 @@
|
||||
term.open(document.getElementById('terminal'))
|
||||
fitAddon.fit()
|
||||
|
||||
const token = new URLSearchParams(window.location.search).get('token')
|
||||
|
||||
// Create WebSocket connection
|
||||
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:'
|
||||
const ws = new WebSocket(`${protocol}//${window.location.host}/ws`)
|
||||
const ws = new WebSocket(
|
||||
`${protocol}//${window.location.host}${window.location.pathname}/ws?token=${token}`
|
||||
)
|
||||
|
||||
// Handle WebSocket connection
|
||||
ws.onopen = () => {
|
||||
|
||||
Reference in new issue
Block a user