Skip to content

Commit b49d20c

Browse files
authored
support websocket middleware proxy
support websocket middleware proxy
2 parents c9fd7a0 + 3a00f3b commit b49d20c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cyclops-ui/src/components/pages/Terminal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const ExecTerminal = ({
4343
fitAddon.current?.fit();
4444

4545
socket.current = new WebSocket(
46-
`ws://localhost:8888/exec/${namespace}/${podName}/${containerName}`,
46+
`/api/exec/${namespace}/${podName}/${containerName}`,
4747
);
4848

4949
socket.current.onopen = () => {

cyclops-ui/src/setupProxy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = function (app) {
66
createProxyMiddleware({
77
target: process.env.REACT_APP_CYCLOPS_CTRL_HOST,
88
changeOrigin: true,
9+
ws: true,
910
pathRewrite: {
1011
"^/api": "",
1112
},

0 commit comments

Comments
 (0)