1

I am using the nodejs npm package 'knox' to connect to amazon s3. And I would like to create a download url.

At the moment I use:

var expires = new Date();
expires.setMinutes(expires.getMinutes() + 30);
var url =  client.signedUrl('/test/obj.json', expires);

This generates HTTPS URLs that look like this:

HTTPS://......../test/obj.json......

Is it possible to get a http url?

HTTP://......./text/obj.json......

I want to show images on my homepage and they dont need to be TLS secured.

ben75
  • 29,217
  • 10
  • 88
  • 134
Nils Ziehn
  • 4,118
  • 6
  • 26
  • 40

1 Answers1

0

Not at all familiar with Knox, but looking at the code, if you pass a port option to the Client constructor it will use http instead of https.

robertklep
  • 198,204
  • 35
  • 394
  • 381
  • In the Knox documentation it says that when you turn the 'secure' flag to http or change the port (which makes the secure flag default to http ) the communication to the Amazon S3 is via HTTP, isn't this a security risk for my credentials? – Nils Ziehn Oct 26 '13 at 15:04
  • @NilsZiehn if it would mean that *everything* is passed over HTTP, then it might not be the best thing to do. – robertklep Oct 26 '13 at 15:33
  • Thats at least how I understand the Knox documentation. – Nils Ziehn Oct 27 '13 at 09:47