Add GET /ipinfo/tracker

The endpoint returns the name of tracker. It is used to determine
whether the router is running a tracker.
This commit is contained in:
Martynas Pumputis authored and Bryan Boreham committed 2016-06-08 16:44:54 +01:00
1 parent 9fc7be83c8
commit de2a70861c
4 files changed
+17 -3

No files matched your search

+1 -1
View File
@@ -43,7 +43,7 @@ func listenHTTP(alloc *Allocator, subnet address.CIDR) int {
router.HandleFunc("/status", func(w http.ResponseWriter, r *http.Request) {
io.WriteString(w, fmt.Sprintln(alloc))
})
alloc.HandleHTTP(router, subnet, nil)
alloc.HandleHTTP(router, subnet, "", nil)
httpListener, err := net.Listen("tcp", ":0")
if err != nil {