diff options
Diffstat (limited to 'system/tls/enabledev.go')
-rw-r--r-- | system/tls/enabledev.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/system/tls/enabledev.go b/system/tls/enabledev.go index 3550fc0..03bce42 100644 --- a/system/tls/enabledev.go +++ b/system/tls/enabledev.go @@ -3,8 +3,9 @@ package tls import ( "log" "net/http" - "os" "path/filepath" + + "github.com/ponzu-cms/ponzu/system/cfg" ) // EnableDev generates self-signed SSL certificates to use HTTPS & HTTP/2 while @@ -15,13 +16,7 @@ import ( func EnableDev() { setupDev() - pwd, err := os.Getwd() - if err != nil { - log.Fatalln("Couldn't find working directory to activate dev certificates:", err) - } - - vendorPath := filepath.Join(pwd, "cmd", "ponzu", "vendor", "github.com", "ponzu-cms", "ponzu", "system", "tls") - + vendorPath := cfg.TlsDir() cert := filepath.Join(vendorPath, "devcerts", "cert.pem") key := filepath.Join(vendorPath, "devcerts", "key.pem") |