fix: use localhost instead of 127.0.0.1

This commit is contained in:
lilong.129
2025-05-27 20:16:10 +08:00
parent 866cc0e4d2
commit 229fd4678c
5 changed files with 5 additions and 4 deletions

View File

@@ -86,7 +86,7 @@ func (r *Router) Init() {
}
func (r *Router) Run(port int) error {
err := r.Engine.Run(fmt.Sprintf("127.0.0.1:%d", port))
err := r.Engine.Run(fmt.Sprintf("localhost:%d", port))
if err != nil {
log.Err(err).Msg("failed to start http server")
return err