summaryrefslogtreecommitdiffstats
path: root/roseh.moe.go
diff options
context:
space:
mode:
Diffstat (limited to 'roseh.moe.go')
-rw-r--r--roseh.moe.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/roseh.moe.go b/roseh.moe.go
index 97487de..bf00e81 100644
--- a/roseh.moe.go
+++ b/roseh.moe.go
@@ -34,7 +34,7 @@ var (
selfURL = flag.String("self-url", "http://localhost:42069", "base URL of the server")
secretsFile = flag.String("secrets", "secrets.ccl", "secrets file")
configFile = flag.String("config", "config.ccl", "configuration file (ccl format https://pkg.go.dev/roseh.moe/pkg/ccl)")
- https = flag.Bool("https", false, "use https")
+ https = flag.String("https", "", "directory containing cert.pem and key.pem, or empty string to use unencrypted http")
serverStartTime = time.Now()
)
@@ -582,8 +582,8 @@ func main() {
addr := fmt.Sprintf(":%d", *port)
log.Printf("Listening on %q", addr)
- if *https {
- log.Fatal(http.ListenAndServeTLS(addr, "/var/lib/acme/roseh.moe/cert.pem", "/var/lib/acme/roseh.moe/key.pem", nil))
+ if *https != "" {
+ log.Fatal(http.ListenAndServeTLS(addr, *https+"/cert.pem", *https+"/key.pem", nil))
} else {
log.Fatal(http.ListenAndServe(addr, nil))
}