|
|
@ -4,14 +4,15 @@ |
|
|
|
package core |
|
|
|
|
|
|
|
import ( |
|
|
|
"time" |
|
|
|
|
|
|
|
"github.com/fvbock/endless" |
|
|
|
"github.com/gin-gonic/gin" |
|
|
|
"time" |
|
|
|
) |
|
|
|
|
|
|
|
func initServer(address string, router *gin.Engine) server { |
|
|
|
s := endless.NewServer(address, router) |
|
|
|
s.ReadHeaderTimeout = 10 * time.Millisecond |
|
|
|
s.ReadHeaderTimeout = 10 * time.Second |
|
|
|
s.WriteTimeout = 10 * time.Second |
|
|
|
s.MaxHeaderBytes = 1 << 20 |
|
|
|
return s |
|
|
|