Add back privatekey, but automatically generate it if it does not exist
This commit is contained in:
parent
32006f3a20
commit
34f4109fbd
4 changed files with 73 additions and 16 deletions
2
api.go
2
api.go
|
@ -34,7 +34,7 @@ func (h *Headscale) KeyHandler(ctx *gin.Context) {
|
|||
ctx.Data(
|
||||
http.StatusOK,
|
||||
"text/plain; charset=utf-8",
|
||||
[]byte(MachinePublicKeyStripPrefix(*h.publicKey)),
|
||||
[]byte(MachinePublicKeyStripPrefix(h.privateKey.Public())),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue