Minor change in router

This commit is contained in:
Juan Font Alonso 2022-08-14 21:07:05 +02:00
parent 0f09e19e38
commit aaa33cf093
2 changed files with 2 additions and 1 deletions

1
api.go
View file

@ -679,6 +679,7 @@ func (h *Headscale) handleMachineRegistrationNew(
// The machine registration is new, redirect the client to the registration URL // The machine registration is new, redirect the client to the registration URL
log.Debug(). log.Debug().
Caller().
Str("machine", registerRequest.Hostinfo.Hostname). Str("machine", registerRequest.Hostinfo.Hostname).
Msg("The node seems to be new, sending auth url") Msg("The node seems to be new, sending auth url")
if h.cfg.OIDC.Issuer != "" { if h.cfg.OIDC.Issuer != "" {

2
app.go
View file

@ -467,7 +467,7 @@ func (h *Headscale) createNoiseMux() *mux.Router {
router := mux.NewRouter() router := mux.NewRouter()
router.HandleFunc("/machine/register", h.NoiseRegistrationHandler).Methods(http.MethodPost) router.HandleFunc("/machine/register", h.NoiseRegistrationHandler).Methods(http.MethodPost)
router.HandleFunc("/machine/map", h.NoisePollNetMapHandler).Methods(http.MethodPost) router.HandleFunc("/machine/map", h.NoisePollNetMapHandler)
return router return router
} }