fix(ui): pass configured alertmanager headers when making requests from the browser

Right now configured headers are only set on requests made from the backend to alertmanager API.
With this change fetch() calls in the browser will use those headers if proxy mode is not enabled.
This commit is contained in:
Łukasz Mierzwa
2019-09-26 17:18:27 +01:00
parent 4efe17e8f1
commit 80c30f1879
17 changed files with 121 additions and 25 deletions

View File

@@ -70,6 +70,7 @@ const APIAlertmanagerUpstream = PropTypes.exact({
cluster: PropTypes.string.isRequired,
uri: PropTypes.string.isRequired,
publicURI: PropTypes.string.isRequired,
headers: PropTypes.object.isRequired,
error: PropTypes.string.isRequired,
version: PropTypes.string.isRequired,
clusterMembers: PropTypes.arrayOf(PropTypes.string).isRequired