From 4183db840e1f308ba01df0c879e0c99bceaeb621 Mon Sep 17 00:00:00 2001 From: Juan Font Alonso Date: Thu, 6 May 2021 23:25:40 +0200 Subject: [PATCH] Update README (although do not advirtise preauth keys that much yet) --- api.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api.go b/api.go index 7b98dfa..a9a23dc 100644 --- a/api.go +++ b/api.go @@ -9,6 +9,7 @@ import ( "net/http" "time" + "github.com/davecgh/go-spew/spew" "github.com/gin-gonic/gin" "github.com/jinzhu/gorm" "github.com/jinzhu/gorm/dialects/postgres" @@ -96,6 +97,7 @@ func (h *Headscale) RegistrationHandler(c *gin.Context) { log.Println("Client is registered and we have the current key. All clear to /map") resp.AuthURL = "" resp.User = *m.Namespace.toUser() + resp.MachineAuthorized = true respBody, err := encode(resp, &mKey, h.privateKey) if err != nil { log.Printf("Cannot encode message: %s", err) @@ -138,6 +140,7 @@ func (h *Headscale) RegistrationHandler(c *gin.Context) { } log.Println("We dont know anything about the new key. WTF") + spew.Dump(req) } // PollNetMapHandler takes care of /machine/:id/map