Skip to content

Commit

Permalink
AddsHTTPS support for REST protocol for AWS Neptune. (#82)
Browse files Browse the repository at this point in the history
* adds https support for REST protocol

* add https flag to graphConf
  • Loading branch information
bhsu22 authored Mar 2, 2020
1 parent b18436b commit 33b00dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions scripts/graphConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const host = false;
// For implementations like Neptune where only single commands are allowed per request
// set to true
const SINGLE_COMMANDS_AND_NO_VARS = false;
// For implementations like Neptune where communication only over https is allowed
// set to true
const REST_USE_HTTPS = false;

// Time out for the REST protocol. Increase it if the graphDB is slow.
const REST_TIMEOUT = 2000
Expand Down
6 changes: 5 additions & 1 deletion scripts/graphioGremlin.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,11 @@ var graphioGremlin = (function(){
let server_port = $('#server_port').val();
let COMMUNICATION_PROTOCOL = $('#server_protocol').val();
if (COMMUNICATION_PROTOCOL == 'REST'){
let server_url = "http://"+server_address+":"+server_port;
if(REST_USE_HTTPS){
let server_url = "https://"+server_address+":"+server_port;
} else{
let server_url = "http://"+server_address+":"+server_port;
}
run_ajax_request(gremlin_query,server_url,query_type,active_node,message,callback);
}
else if (COMMUNICATION_PROTOCOL == 'websocket'){
Expand Down

0 comments on commit 33b00dc

Please sign in to comment.