mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
fix(ui): pass credentials when sending silences to alertmanager
Fixes #484
This commit is contained in:
@@ -141,7 +141,10 @@ const DeleteSilenceModalContent = observer(
|
||||
if (this.deleteState.done && this.deleteState.error === null) return;
|
||||
|
||||
const uri = `${alertmanager.publicURI}/api/v1/silence/${silenceID}`;
|
||||
this.deleteState.fetch = fetch(uri, { method: "DELETE" })
|
||||
this.deleteState.fetch = fetch(uri, {
|
||||
method: "DELETE",
|
||||
credentials: "include"
|
||||
})
|
||||
.then(result => result.json())
|
||||
.then(result => this.parseAlertmanagerResponse(result))
|
||||
.catch(err => {
|
||||
|
||||
@@ -104,7 +104,8 @@ const SilenceSubmitProgress = observer(
|
||||
body: JSON.stringify(payload),
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
},
|
||||
credentials: "include"
|
||||
})
|
||||
.then(result => result.json())
|
||||
.then(result => this.parseAlertmanagerResponse(am.uri, result))
|
||||
|
||||
Reference in New Issue
Block a user