backend/main.go aktualisiert
fix wrong order and description of ssl certificate
This commit is contained in:
@@ -33,8 +33,8 @@ func main() {
|
|||||||
organization := flag.String("organization", "", "self signed ciertificate organization")
|
organization := flag.String("organization", "", "self signed ciertificate organization")
|
||||||
port := flag.Uint("port", 9500, "server listening port")
|
port := flag.Uint("port", 9500, "server listening port")
|
||||||
https := flag.Bool("https", false, "serves as https needs flag -cert and -chain")
|
https := flag.Bool("https", false, "serves as https needs flag -cert and -chain")
|
||||||
sslCert := flag.String("cert", "", "ssl certificate path")
|
sslKey := flag.String("privkey", "", "ssl private key path")
|
||||||
sslChain := flag.String("chain", "", "ssl chain path")
|
sslFullchain := flag.String("fullchain", "", "ssl fullchain path")
|
||||||
debug := flag.Bool("debug", false, "log debug")
|
debug := flag.Bool("debug", false, "log debug")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ func main() {
|
|||||||
|
|
||||||
// start https server
|
// start https server
|
||||||
logger.Info("main", fmt.Sprintf("https listen on ip: %s port: %d", *ip, *port))
|
logger.Info("main", fmt.Sprintf("https listen on ip: %s port: %d", *ip, *port))
|
||||||
if err := s.ServeHttps(*ip, *port, cert.Cert{Organization: *organization, CertFile: *sslCert, KeyFile: *sslChain}); err != nil {
|
if err := s.ServeHttps(*ip, *port, cert.Cert{Organization: *organization, CertFile: *sslFullchain, KeyFile: *sslKey}); err != nil {
|
||||||
logger.Error("main", "error https server "+err.Error())
|
logger.Error("main", "error https server "+err.Error())
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user