Merge pull request #500 from bravechamp/patch-1

Fix API access
This commit is contained in:
Juan Font 2022-03-15 14:53:23 +01:00 committed by GitHub
commit 1579ffb66a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

2
app.go
View file

@ -409,8 +409,6 @@ func (h *Headscale) httpAuthenticationMiddleware(ctx *gin.Context) {
return return
} }
ctx.AbortWithStatus(http.StatusUnauthorized)
valid, err := h.ValidateAPIKey(strings.TrimPrefix(authHeader, AuthPrefix)) valid, err := h.ValidateAPIKey(strings.TrimPrefix(authHeader, AuthPrefix))
if err != nil { if err != nil {
log.Error(). log.Error().