feat: display name in /api endpoint.

This commit is contained in:
Fernandez Ludovic
2020-06-20 19:55:29 +02:00
parent b112c2640e
commit 1ef68230de

2
app.go
View File

@ -191,6 +191,7 @@ func apiHandler(w http.ResponseWriter, req *http.Request) {
URL string `json:"url,omitempty"`
Host string `json:"host,omitempty"`
Method string `json:"method,omitempty"`
Name string `json:"name,omitempty"`
}{
Hostname: hostname,
IP: []string{},
@ -198,6 +199,7 @@ func apiHandler(w http.ResponseWriter, req *http.Request) {
URL: req.URL.RequestURI(),
Host: req.Host,
Method: req.Method,
Name: name,
}
ifaces, _ := net.Interfaces()