Skip to content

Commit

Permalink
723 lab 728 lab 721 web socket security error in production (#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
thetechnocrat-dev authored Oct 23, 2023
1 parent c529d1d commit d11503c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions frontend/app/job/detail/[jobID]/LogViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ const LogViewer = () => {

useEffect(() => {
setLogs('')
// remove http:// or https:// from backendUrl for websocket
let formattedBackendUrl = backendUrl().replace('http://', '')
formattedBackendUrl = formattedBackendUrl.replace('https://', '')

let formattedBackendUrl = backendUrl().replace('http://', '').replace('https://', '');
let wsProtocol = backendUrl().startsWith('https://') ? 'wss' : 'ws';

console.log(formattedBackendUrl)
const ws = new WebSocket(`ws://${formattedBackendUrl}/jobs/${job.BacalhauJobID}/logs`)
const ws = new WebSocket(`${wsProtocol}://${formattedBackendUrl}/jobs/${job.BacalhauJobID}/logs`)

ws.onopen = () => {
console.log('connected')
Expand Down
1 change: 1 addition & 0 deletions tools/equibind/equibind_gateway.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"dockerPull": "ghcr.io/labdao/equibind:main@sha256:21a381d9ab1ff047565685044569c8536a55e489c9531326498b28d6b3cc244f",
"gpuBool": false,
"networkBool": false,
"memoryGB": 5,
"inputs": {
"protein": {
"type": "File",
Expand Down

0 comments on commit d11503c

Please sign in to comment.