Skip to content

Allow ws access when remotely accessing openrvdas webUI via port forwarding #337

Open
@webbpinner

Description

@webbpinner

Several vessels provide remote access to the OpenRVDAS via ssh-based port forwarding. This works for the static portions of the OpenRVDAS webUI but because the port used for the ws connection is explicitly defined to a port number within the settings.py file the ws socket traffic is not accessible when accessing via ssh port-forwarding.

Running on the assumption that the WS port is the same as the port used by nginx during install would it be possible to define the ws port as the same port specified in the URL.

TL;DR
Can the default vault of WEBSOCKET_SERVER be changed from:

var WEBSOCKET_SERVER = "ws://:80/cds-ws";

To:

var WEBSOCKET_SERVER = (document.location.protocol === 'https:' ? 'wss' : 'ws' ) + '//:' + document.location.port + "/cds-ws";

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions