Fix API access

By allowing API keys to be validated
This commit is contained in:
bravechamp 2022-03-15 16:05:56 +03:00 committed by GitHub
parent 61440c42d3
commit 0bfa5302a7
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().