This Node-RED contribution provides an enhanced HTTP Request node specifically designed for making HTTPS requests. It extends the core Node-RED HTTP Request node by adding the `msg.peerCertificate` property to the output message, allowing flow developers to inspect the server's TLS/SSL certificate after a successful connection. This is crucial for applications requiring advanced certificate validation or logging. The package is currently at version 2.0.0, indicating a stable release with potential breaking changes from previous major versions. Node-RED contrib packages typically follow an as-needed release cadence, driven by user feedback and Node-RED core updates. Its key differentiator is the direct exposure of the `peerCertificate` object, which is not available in the standard Node-RED HTTP Request node, making it indispensable for secure or compliance-driven integrations.
npm install node-red-contrib-httpsVerified import paths — ran on the pinned version, not inferred.
This Node-RED flow demonstrates how to use the 'HTTPS Request' node to fetch data from `example.com` and then display the `peerCertificate` object in the debug sidebar.
Review the node's configuration options and ensure backward compatibility for `msg.peerCertificate` structure, especially if parsing specific certificate fields.
Ensure that your Node.js environment trusts the certificate authority for the target server. For self-signed certificates in development, consider setting `rejectUnauthorized` to `false` (with caution) or providing a custom CA certificate.
Always check for the existence of `msg.peerCertificate` before attempting to access its properties (e.g., `if (msg.peerCertificate) { ... }`) and handle error paths in your flow.In the node's TLS configuration, provide the correct CA certificate, or for development purposes, check 'Allow insecure TLS (self-signed, etc.)' (sets `rejectUnauthorized: false`) with caution.
Before accessing `msg.peerCertificate` properties, always include a check: `if (msg.peerCertificate && msg.peerCertificate.commonName) { ... }` in your function nodes.Verify the URL and hostname are correctly spelled and accessible from the Node-RED instance's network. Check DNS settings if needed.