ping
This commit is contained in:
parent
10852fac3b
commit
fa4449deb0
|
|
@ -14,6 +14,7 @@ import (
|
|||
"github.com/go-kratos/kratos/v2/transport/http/pprof"
|
||||
"github.com/gorilla/handlers"
|
||||
http2 "net/http"
|
||||
"time"
|
||||
v1 "voucher/api/v1"
|
||||
"voucher/internal/conf"
|
||||
log2 "voucher/internal/pkg/log"
|
||||
|
|
@ -50,8 +51,9 @@ func buildHTTPServer(c *conf.Bootstrap, accessLogger *log2.AccessLogger, log *lo
|
|||
if c.Server.Http.Addr != "" {
|
||||
opts = append(opts, http.Address(c.Server.Http.Addr))
|
||||
}
|
||||
|
||||
if c.Server.Http.Timeout != nil {
|
||||
opts = append(opts, http.Timeout(c.Server.Http.Timeout.AsDuration()))
|
||||
opts = append(opts, http.Timeout(30*time.Second))
|
||||
}
|
||||
|
||||
// 允许跨域
|
||||
|
|
|
|||
Loading…
Reference in New Issue