Skip to content

Commit

Permalink
added websocket secure (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
sherrisherry authored Mar 16, 2020
1 parent 03cd908 commit ab3a961
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions graphexp.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ <h1 class="header-heading">Graph Explorer v 0.6</h1>
<label for="server_protocol">Protocol:</label>
<select name="server_protocol" id="server_protocol">
<option value="websocket">websocket</option>
<option value="websockets">websocket secure</option>
<option value="REST">REST</option>
</select>
</div>
Expand Down
4 changes: 4 additions & 0 deletions scripts/graphioGremlin.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ var graphioGremlin = (function(){
let server_url = "ws://"+server_address+":"+server_port+"/gremlin"
run_websocket_request(gremlin_query,server_url,query_type,active_node,message,callback);
}
else if (COMMUNICATION_PROTOCOL == 'websockets'){
let server_url = "wss://"+server_address+":"+server_port+"/gremlin"
run_websocket_request(gremlin_query,server_url,query_type,active_node,message,callback);
}
else {
console.log('Bad communication protocol. Check configuration file. Accept "REST" or "websocket" .')
}
Expand Down

0 comments on commit ab3a961

Please sign in to comment.