api.go 229 B

12345678910111213
  1. package common
  2. import (
  3. "github.com/coroot/coroot-node-agent/flags"
  4. )
  5. func AuthHeaders() map[string]string {
  6. res := map[string]string{}
  7. if apiKey := *flags.ApiKey; apiKey != "" {
  8. res["X-Api-Key"] = apiKey
  9. }
  10. return res
  11. }