mozilla-services / ip-reputation-js-client

A node JS client to the iprepd IP reputation service
Mozilla Public License 2.0
5 stars 8 forks source link

For consideration: use ssl, set default strictSSL and do not follow redirects #3

Closed jrgm closed 7 years ago

jrgm commented 7 years ago

For consideration, but shouldn't this service not be plaintext?

jrgm commented 7 years ago

Or, I guess, in development, running without TLS is easier. But this service cannot be configured to use TLS - https://github.com/mozilla-services/ip-reputation-js-client/blob/master/lib/client.js#L31.

followRedirect can be disabled by default, and strictSSL can be conditioned on the scheme used (http vs. https).

g-k commented 7 years ago

So the options could be:

Alternatively, just pass through a service url to request and infer strictSSL from the scheme e.g.

https://tigerblood.stage.mozaws.net/ -> {uri: "https://tigerblood.stage.mozaws.net/", followRedirect: false, strictSSL: true}

http://127.0.0.1:8080/ -> {uri: "http://127.0.0.1:8080/", followRedirect: false, strictSSL: false}