How to set TLS settings?
ibc opened this issue · comments
When running in Node:
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
var Q = require('q-xhr')(XMLHttpRequest, require('q'));
Q.xhr.get('https://example.com/foo/bar');
Is there any way to set TLS options needed for Node to trust remote certs and so on?
Hi,
This module is for the browser, not Node.js . Client-side JavaScript has no way to control SSL level options or settings at all, including client side certificates.
Are you trying to reuse code between the browser and server here? Otherwise I'd try using request. If you are, I'd see if xmlhttprequest
can provide the options you're looking for.
The point is that I can use this module in a Node script (not just for server side I mean) by using node-XMLHttpRequest, and it works if server certificate is valid. Still there are no ways to set Node TLS settings to node-XMLHttpRequest anyhow...
The request
package has support for TLS options