starsz commented on a change in pull request #1824:
URL: https://github.com/apache/apisix-dashboard/pull/1824#discussion_r619737167



##########
File path: api/cmd/managerapi.go
##########
@@ -124,6 +124,24 @@ func NewManagerAPICommand() *cobra.Command {
                                }
                        }()
 
+                       // HTTPS
+                       if conf.SSLCert != "" && conf.SSLKey != "" {
+                               addrSSL := fmt.Sprintf("%s:%d", 
conf.ServerHost, conf.SSLPort)
+                               serverSSL := &http.Server{
+                                       Addr:         addrSSL,
+                                       Handler:      r,
+                                       ReadTimeout:  time.Duration(1000) * 
time.Millisecond,
+                                       WriteTimeout: time.Duration(5000) * 
time.Millisecond,
+                               }
+                               go func() {
+                                       err := 
serverSSL.ListenAndServeTLS(conf.SSLCert, conf.SSLKey)
+                                       if err != nil && err != 
http.ErrServerClosed {
+                                               utils.CloseAll()
+                                               log.Fatalf("listen and serv 
fail: %s", err)
+                                       }
+                               }()
+                       }
+
                        printInfo()

Review comment:
       Need to update the printInfo.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to