http_sd_configs: authorization.type is not defaulted to "Bearer" as doc claims
resmo opened this issue · 0 comments
resmo commented
In https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_sd_config
Docs says:
# Optional `Authorization` header configuration.
authorization:
# Sets the authentication type.
[ type: [<string>] | default: Bearer ]
But it did not work, this config below does not send Bearer
scrape_configs:
- job_name: xyz
http_sd_configs:
- url: "http://127.0.1:8000"
authorization:
credentials: <token>
While enabled debug on my endpoint showed, it only sends
Authorization: <token>
not the expected
Authorization: Bearer <token>
After setting the type explicitly, the config worked as expected:
scrape_configs:
- job_name: xyz
http_sd_configs:
- url: "http://127.0.1:8000"
authorization:
credentials: <token>
type: Bearer