nanocube icon indicating copy to clipboard operation
nanocube copied to clipboard

Running over HTTPS

Open markwynter opened this issue 8 years ago • 3 comments

Hi there! We're wanting to deploy nanocubes through iframe in web portal(s) - we've implement a replace rule on application nginx server http://" and "https://" to just "//" (so protocol independent URL) - but this doesn't appear sufficient as nanocube server side JavaScript is making http requests which breaks if front end portal is https. Equally if we hard code https URLs in the nanocube backend, we can't support portals running over http. Is there a protocol independent solution we can implement on nanocube server side? Any guidance would be most appreciated. Kind regards, Mark

markwynter avatar Mar 10 '16 11:03 markwynter

Just to clarify, the issue is with nc_web_viewer, and our requirement is to make the nanocube application server protocol agnostic so we can embed the nc_web_viewer in iframes that may be served independently over http or https.

markwynter avatar Mar 10 '16 11:03 markwynter

Nanocube uses the Mongoose Embedded Web Server Library for its web communication infra structure. The master branch version of the nanocube server allows you to pass an SSL certificate file .pem with the option --sslfile <pem-file> which triggers the mongoose option "ssl_certificate". Here is the code for that on line 160 of src/Server.cc mg_set_option(srv, "ssl_certificate", pemfile.c_str());

Here is the template of the call: nanocube-leaf -q <query-port> --sslfile <ssl-certificate> < <dataset-file>

laurolins avatar Mar 10 '16 15:03 laurolins

Thanks Lauro - we're still grappling with this - I've asked my developers to clearly layout the issue, which I'll share with you shortly.

markwynter avatar Mar 21 '16 10:03 markwynter