feat: display name in /api endpoint.
This commit is contained in:
2
app.go
2
app.go
@ -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()
|
||||
|
Reference in New Issue
Block a user