crowdsec/pkg/cti/auth.go
2024-03-07 22:25:54 +01:00

15 lines
219 B
Go

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
}
}