Skip to content

Commit

Permalink
Optimize HTTP print (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
hwbrzzl authored Jun 9, 2023
1 parent eeed904 commit eb93db0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion route/gin.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ func (r *Gin) Run(host ...string) error {
outputRoutes(r.instance.Routes())
color.Greenln("[HTTP] Listening and serving HTTP on " + host[0])

return r.instance.Run([]string{host[0]}...)
server := &http.Server{
Addr: host[0],
Handler: http.AllowQuerySemicolons(r.instance),
}

return server.ListenAndServe()
}

func (r *Gin) RunTLS(host ...string) error {
Expand Down

0 comments on commit eb93db0

Please sign in to comment.