Update README (although do not advirtise preauth keys that much yet)

This commit is contained in:
Juan Font Alonso 2021-05-06 23:25:40 +02:00
parent fc0c519206
commit 4183db840e

3
api.go
View file

@ -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