cloudspout / cloudspout-button-panel

Grafana panel to integrate with any kind of HTTP/REST API
MIT License
50 stars 35 forks source link

Wrong 'Authorization' header for the 'Basic' authentication scheme #33

Closed kochetov-dmitrij closed 3 years ago

kochetov-dmitrij commented 3 years ago

Add 'Basic ' in https://github.com/cloudspout/cloudspout-button-panel/blob/743a01b174358bce41d39302ebc1dfae06f272e8/src/ButtonPanel.tsx#L52 Solution:

requestHeaders.set('Authorization', 'Basic ' + btoa(options.username + ':' + options.password));

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization

derjust commented 3 years ago

Thanks for reporting. Fixed in 6ba38a0