homebridge-hubitat-makerapi icon indicating copy to clipboard operation
homebridge-hubitat-makerapi copied to clipboard

Introduce support for `https:` in util_http.

Open bdruth opened this issue 2 years ago • 0 comments

Currently, the plugin doesn't support communicating with a Hubitat hub using SSL exclusively, as documented in this community post. This PR introduces support in util_http.js to detect that an https: URL protocol is configured in the plugin's app_url and makes the appropriate adjustments for that.

  • parse protocol from URL
  • use protocol to default app_port to 80 | 443
  • Use node's 'https' lib if protocol is https

bdruth avatar Dec 30 '22 20:12 bdruth