mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 03:37:46 +08:00
[REV]Update api http/https
This commit is contained in:
parent
fc69a1ac30
commit
73c6b3a32d
@ -131,13 +131,16 @@ func (m *Manager) Run() {
|
||||
logrus.Fatal(http.ListenAndServe(m.conf.WebsocketAddr, websocketRouter))
|
||||
}
|
||||
}()
|
||||
go func() {
|
||||
logrus.Infof("api listen on (HTTP) 0.0.0.0%v", m.conf.APIAddr)
|
||||
logrus.Fatal(http.ListenAndServe(m.conf.APIAddr, m.r))
|
||||
}()
|
||||
if m.conf.APISSL {
|
||||
logrus.Infof("api listen on (HTTPs) 0.0.0.0%v", m.conf.APIAddrSSL)
|
||||
logrus.Fatal(http.ListenAndServeTLS(m.conf.APIAddrSSL, m.conf.APICertFile, m.conf.APIKeyFile, m.r))
|
||||
go func() {
|
||||
logrus.Infof("api listen on (HTTP) 0.0.0.0%v", m.conf.APIAddr)
|
||||
logrus.Fatal(http.ListenAndServe(m.conf.APIAddr, m.r))
|
||||
}()
|
||||
} else {
|
||||
logrus.Infof("api listen on (HTTP) 0.0.0.0%v", m.conf.APIAddr)
|
||||
logrus.Fatal(http.ListenAndServe(m.conf.APIAddr, m.r))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user