This commit is contained in:
eson 2023-08-21 15:57:37 +08:00
parent 1b04ac57e5
commit ebbcc2050c

View File

@ -114,7 +114,18 @@ func main() {
ServerAddress := ":9900"
log.Println("listen on ", ServerAddress)
log.Fatal(http.ListenAndServe(ServerAddress, mux))
keydata, err := os.ReadFile("/opt/server.fusen.3718.cn.key")
if err != nil {
panic(err)
}
pemdata, err := os.ReadFile("/opt/server.fusen.3718.cn.pem")
if err != nil {
panic(err)
}
log.Fatal(http.ListenAndServeTLS(ServerAddress, string(pemdata), string(keydata), mux))
}
// 后端服务的类型