Ask about HTTPS on a fresh install
A fresh install asks whether to serve HTTPS, with the reasons, before touching anything. --yes keeps the default, --no-https answers it, and an update keeps the saved mode. The prompt reads /dev/tty so `curl | bash` still works; without a terminal the default is explained instead. Also state why a production process is serving plain HTTP (no TLS vars), instead of only giving that hint in development.
This commit is contained in:
+4
-2
@@ -86,9 +86,11 @@ if (
|
||||
bunext.bunextLog.info(`Using the development certificate in certs/`);
|
||||
}
|
||||
|
||||
if (!cert_file && !key_file && process.env.NODE_ENV != "production") {
|
||||
if (!cert_file && !key_file) {
|
||||
bunext.bunextLog.info(
|
||||
"Serving plain HTTP (run `bun run dev:phone`, or `bun run gen:certs` then restart, for HTTPS)",
|
||||
process.env.NODE_ENV == "production"
|
||||
? "Serving plain HTTP (set TLS_CERT_FILE and TLS_KEY_FILE for HTTPS)"
|
||||
: "Serving plain HTTP (run `bun run dev:phone`, or `bun run gen:certs` then restart, for HTTPS)",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user