harmony-api icon indicating copy to clipboard operation
harmony-api copied to clipboard

Add HTTPS server

Open misku opened this issue 7 years ago • 2 comments

Configuration example:

"http_server": {
  "type": "https",
  "port": 8891,
  "cert": "/path/to/fullchain.pem",
  "key": "/path/to/privkey.pem"
}

type: "http" | "https" (default: "http") port: (default 8282) cert: path to server certificate key : path to private key

If "http_server" key is missing, no HTTP server will be started. If "type" == "https" && ("cert" || "key" is missing or corrupted) an error will be thrown.

misku avatar May 05 '18 16:05 misku

This is great, thanks! Just a couple of notes.

  1. Could you make it so enableHTTPserver still enables the http server. Otherwise it will break current installs after an upgrade. This is an easy way to keep some backwards compat.
  2. Could you document this in the README.

maddox avatar May 07 '18 13:05 maddox

Sure, no problem. I'm glad you like it.

misku avatar May 07 '18 15:05 misku