This commit is contained in:
parent
88d550f947
commit
2a708c8d1a
3
main.go
3
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")
|
logger.Debug().Str("body", string(body)).Msg("read body")
|
||||||
|
|
||||||
var jd PublicInfo
|
var jd PublicInfo
|
||||||
|
|
||||||
if err := json.Unmarshal(body, &jd); err != nil {
|
if err := json.Unmarshal(body, &jd); err != nil {
|
||||||
logger.Error().Msg(err.Error())
|
logger.Error().Msg(err.Error())
|
||||||
http.Error(w, "could not unmarshal body", http.StatusInternalServerError)
|
http.Error(w, "could not unmarshal body", http.StatusInternalServerError)
|
||||||
@ -75,8 +76,8 @@ func (l Logic) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// jd.LocalAddress = l.ExternalURL
|
|
||||||
var nd PublicInfo
|
var nd PublicInfo
|
||||||
|
|
||||||
nd.ServerName = jd.ServerName
|
nd.ServerName = jd.ServerName
|
||||||
nd.Version = jd.Version
|
nd.Version = jd.Version
|
||||||
nd.ProductName = jd.ProductName
|
nd.ProductName = jd.ProductName
|
||||||
|
Loading…
Reference in New Issue
Block a user