Skip to content

Commit

Permalink
Minor formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfont committed Aug 14, 2022
1 parent 5b14caf commit 90bb6ea
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,12 @@ func (h *Headscale) handleMachineExpired(

if h.cfg.OIDC.Issuer != "" {
resp.AuthURL = fmt.Sprintf("%s/oidc/register/%s",
strings.TrimSuffix(h.cfg.ServerURL, "/"), NodePublicKeyStripPrefix(registerRequest.NodeKey))
strings.TrimSuffix(h.cfg.ServerURL, "/"),
NodePublicKeyStripPrefix(registerRequest.NodeKey))
} else {
resp.AuthURL = fmt.Sprintf("%s/register/%s",
strings.TrimSuffix(h.cfg.ServerURL, "/"), NodePublicKeyStripPrefix(registerRequest.NodeKey))
strings.TrimSuffix(h.cfg.ServerURL, "/"),
NodePublicKeyStripPrefix(registerRequest.NodeKey))
}

respBody, err := encode(resp, &machineKey, h.privateKey)
Expand Down Expand Up @@ -703,7 +705,8 @@ func (h *Headscale) handleMachineRegistrationNew(
)
} else {
resp.AuthURL = fmt.Sprintf("%s/register/%s",
strings.TrimSuffix(h.cfg.ServerURL, "/"), NodePublicKeyStripPrefix(registerRequest.NodeKey))
strings.TrimSuffix(h.cfg.ServerURL, "/"),
NodePublicKeyStripPrefix(registerRequest.NodeKey))
}

respBody, err := encode(resp, &machineKey, h.privateKey)
Expand Down

0 comments on commit 90bb6ea

Please sign in to comment.