Просмотр исходного кода

added cert_key and cert_file to defaults.ini

Torkel Ödegaard 10 лет назад
Родитель
Сommit
c1d7bef768
2 измененных файлов с 4 добавлено и 1 удалено
  1. 3 0
      conf/defaults.ini
  2. 1 1
      pkg/setting/setting.go

+ 3 - 0
conf/defaults.ini

@@ -16,6 +16,9 @@ router_logging = false
 ; the path relative to the binary where the static (html/js/css) files are placed
 static_root_path = public
 enable_gzip = false
+; if https protocol
+cert_file =
+cert_key =
 
 [database]
 ; Either "mysql", "postgres" or "sqlite3", it's your choice

+ 1 - 1
pkg/setting/setting.go

@@ -198,7 +198,7 @@ func NewConfigContext(config string) {
 	if server.Key("protocol").MustString("http") == "https" {
 		Protocol = HTTPS
 		CertFile = server.Key("cert_file").String()
-		KeyFile = server.Key("cert_file").String()
+		KeyFile = server.Key("cert_key").String()
 	}
 
 	Domain = server.Key("domain").MustString("localhost")