crowdsec/pkg/cti/auth.go

15 lines
219 B
Go
Raw Normal View History

2024-02-01 16:20:50 +00:00
package cti
import (
"context"
"net/http"
)
func APIKeyInserter(apiKey string) RequestEditorFn {
return func(ctx context.Context, req *http.Request) error {
req.Header.Add("x-api-key", apiKey)
return nil
}
}