Add back privatekey, but automatically generate it if it does not exist

This commit is contained in:
Kristoffer Dalby committed 2021-11-28 09:17:18 +00:00
1 parent 32006f3a20
commit 34f4109fbd
4 files changed
+73 -16

No files matched your search

+1 -1
View File
@@ -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())),
)
}