Skip to content

Commit

Permalink
Update websocket to support wss.
Browse files Browse the repository at this point in the history
Signed-off-by: Marco A. Gutierrez <[email protected]>
  • Loading branch information
marcoag committed Jun 30, 2024
1 parent 918bf80 commit a6df0c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webapp/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import cloneDeep from 'lodash/cloneDeep'
let config
if (ENV_DEVELOPMENT || !window.venueless) {
const hostname = window.location.hostname
const wsProtocol = window.location.protocol === 'https:' ? 'wss' : 'ws';

Check failure on line 6 in webapp/config.js

View workflow job for this annotation

GitHub Actions / build

Extra semicolon
config = {
api: {
base: `http://${hostname}:8375/api/v1/worlds/sample/`,
socket: `ws://${hostname}:8375/ws/world/sample/`,
socket: `${wsProtocol}://${hostname}:8375/ws/world/sample/`,
upload: `http://${hostname}:8375/storage/upload/`,
scheduleImport: `http://${hostname}:8375/storage/schedule_import/`,
feedback: `http://${hostname}:8375/_feedback/`,
Expand Down

0 comments on commit a6df0c5

Please sign in to comment.