Skip to content

Commit

Permalink
Include credentials in prometheus API fetches
Browse files Browse the repository at this point in the history
I deployed promvt as a subfolder of the same domain I access prometheus from.  That subdomain was protected by an authentication mechanism.  I had to enable authentication on this `fetch` call so that promvt could load from the prometheus API from my browser.
  • Loading branch information
dobesv authored Apr 12, 2018
1 parent 3630a1e commit c8c9aff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Usage extends Component {
if (this.props.request) {
return this.props.request(url);
}
return fetch(url);
return fetch(url, { credentials: 'same-origin' });
}

getData(setState) {
Expand Down

0 comments on commit c8c9aff

Please sign in to comment.