mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
allow osqueryd endpoints to enroll before app setup is complete (#931)
Closes #929
This commit is contained in:
parent
6f0fb864d7
commit
36dfad37ea
1 changed files with 8 additions and 0 deletions
|
|
@ -2,6 +2,7 @@ package service
|
|||
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/go-kit/kit/endpoint"
|
||||
kitlog "github.com/go-kit/kit/log"
|
||||
|
|
@ -381,6 +382,13 @@ func WithSetup(svc kolide.Service, logger kitlog.Logger, next http.Handler) http
|
|||
decodeSetupRequest,
|
||||
encodeResponse,
|
||||
))
|
||||
|
||||
// whitelist osqueryd endpoints
|
||||
if strings.HasPrefix(r.URL.Path, "/api/v1/osquery") {
|
||||
next.ServeHTTP(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
if RequireSetup(svc, logger) {
|
||||
configRouter.ServeHTTP(w, r)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue