nlpodyssey/spago

Support HTTPS by default

evanmcclure opened this issue · 3 comments

Support HTTPS by default, to maintain best practices in delivering cloud-native applications.

Here is a list of flags I propose adding to the servers in order to support TLS.

-address - changes the bind address. The default is "0.0.0.0:1987".
-tls-disable - specifies that TLS is disabled. TLS is enabled by default.
-tls-cert-file - specifies the path of the TLS certificate file. A custom CA certificate may be used by concatenating it to the primary certificate. The default path will be the common system cert path + "/spago.crt".
-tls-key-file - specifies the path to private key for the certificate. The default path will be the common system cert path + "/spago.key".

The command docker build will generate and package a key and self-signed certificate by default, as part of the Docker container image.

Users running the servers from the command line must pass in the flag -tls-disable because there won't be any certificates available in the repository.

@evanmcclure, I'm all for it!

Before making a pull request, would you like to rebase on the main? The server has been slightly changed here #21.