Https file server on nodered+IBM cloud

Hi there,
I need to setup a https file server, used by my iot objects to fetch their updated firmware.
I have a node-red app, (note: on IBM cloud) so the easiest for me would be to use that.

On http that works fine: "http in" node + "file edit in" node + modify headers and response node.

Can anyone help me turn this into https ?

@etawyy Node-RED provides a setting called httpStatic that can be used to point at a directory of static content it should serve. The default configuration for Node-RED running on IBM Cloud already has that set - which is what serves up the landing page you get when you go to your app's url.

So rather than create individual HTTP In flows, if you add the files to the public directory of your app, then they will be served automatically.

There is also an option you can add to your bluemix-settings.js file to force it to redirect any http request to https. You need to add:

requireHttps: true,

into the settings file - add it below the httpStatic line.

Thanks Nick. This was easy. I have done what you suggested and it works with a web browser.

Now my IOT object librairy requires that I use a certificate.

I need to figure that part out on IBM cloud now... The management of the certificate should be done at IBM cloud level ("domain management") or inside node-red?

You'll have to do that at the IBM Cloud level.