diff --git a/main.go b/main.go index 35fca5d..a896217 100644 --- a/main.go +++ b/main.go @@ -68,6 +68,7 @@ func (l Logic) ServeHTTP(w http.ResponseWriter, r *http.Request) { logger.Debug().Str("body", string(body)).Msg("read body") var jd PublicInfo + if err := json.Unmarshal(body, &jd); err != nil { logger.Error().Msg(err.Error()) http.Error(w, "could not unmarshal body", http.StatusInternalServerError) @@ -75,8 +76,8 @@ func (l Logic) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } - // jd.LocalAddress = l.ExternalURL var nd PublicInfo + nd.ServerName = jd.ServerName nd.Version = jd.Version nd.ProductName = jd.ProductName