mirror of
https://github.com/juanfont/headscale.git
synced 2025-02-24 06:29:11 -05:00
Update README (although do not advirtise preauth keys that much yet)
This commit is contained in:
parent
fc0c519206
commit
4183db840e
3
api.go
3
api.go
@ -9,6 +9,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/davecgh/go-spew/spew"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
"github.com/jinzhu/gorm/dialects/postgres"
|
"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")
|
log.Println("Client is registered and we have the current key. All clear to /map")
|
||||||
resp.AuthURL = ""
|
resp.AuthURL = ""
|
||||||
resp.User = *m.Namespace.toUser()
|
resp.User = *m.Namespace.toUser()
|
||||||
|
resp.MachineAuthorized = true
|
||||||
respBody, err := encode(resp, &mKey, h.privateKey)
|
respBody, err := encode(resp, &mKey, h.privateKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Cannot encode message: %s", err)
|
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")
|
log.Println("We dont know anything about the new key. WTF")
|
||||||
|
spew.Dump(req)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PollNetMapHandler takes care of /machine/:id/map
|
// PollNetMapHandler takes care of /machine/:id/map
|
||||||
|
Loading…
x
Reference in New Issue
Block a user