Skip to content

Commit

Permalink
Merge branch 'main' into acls-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
kradalby authored Mar 18, 2022
2 parents 47bbb85 + c850307 commit 79fc74c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion derp.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ func (h *Headscale) scheduledDERPMapUpdateWorker(cancelChan <-chan struct{}) {
case <-ticker.C:
log.Info().Msg("Fetching DERPMap updates")
h.DERPMap = GetDERPMap(h.cfg.DERP)
h.DERPMap.Regions[h.DERPServer.region.RegionID] = &h.DERPServer.region
if h.cfg.DERP.ServerEnabled {
h.DERPMap.Regions[h.DERPServer.region.RegionID] = &h.DERPServer.region
}

namespaces, err := h.ListNamespaces()
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ func (h *Headscale) OIDCCallback(ctx *gin.Context) {

oauth2Token, err := h.oauth2Config.Exchange(context.Background(), code)
if err != nil {
log.Error().
Err(err).
Caller().
Msg("Could not exchange code for token")
ctx.String(http.StatusBadRequest, "Could not exchange code for token")

return
Expand Down

0 comments on commit 79fc74c

Please sign in to comment.