From 75074ab3d5068664f574470414e9cdfe6a7dc868 Mon Sep 17 00:00:00 2001 From: MilosPaunovic Date: Wed, 11 Sep 2024 10:27:54 +0200 Subject: [PATCH] chore(ui): add proper axios parameters to send cookies --- ui/src/stores/api.js | 2 +- ui/src/stores/flow.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/src/stores/api.js b/ui/src/stores/api.js index ed16761fd5..d05dcb1efd 100644 --- a/ui/src/stores/api.js +++ b/ui/src/stores/api.js @@ -81,7 +81,7 @@ export default { } }, pluginIcons(_, __) { - return axios.get(API_URL + "/v1/plugins/icons", {}) + return axios.get(API_URL + "/v1/plugins/icons", {withCredentials: true}) } }, mutations: { diff --git a/ui/src/stores/flow.js b/ui/src/stores/flow.js index 7f49481710..3b60a0f0e9 100644 --- a/ui/src/stores/flow.js +++ b/ui/src/stores/flow.js @@ -166,7 +166,7 @@ export default { if (!flowParsed.id || !flowParsed.namespace) { flowSource = YamlUtils.updateMetadata(flowSource, {id: "default", namespace: "default"}) } - return axios.post(`${apiUrl(this)}/flows/graph`, flowSource, {...config}) + return axios.post(`${apiUrl(this)}/flows/graph`, flowSource, {...config, withCredentials: true}) .then(response => { commit("setFlowGraph", response.data) @@ -252,14 +252,14 @@ export default { return this.$http.delete(`${apiUrl(this)}/flows/delete/by-query`, {params: options}) }, validateFlow({commit}, options) { - return axios.post(`${apiUrl(this)}/flows/validate`, options.flow, textYamlHeader) + return axios.post(`${apiUrl(this)}/flows/validate`, options.flow, {...textYamlHeader, withCredentials: true}) .then(response => { commit("setFlowValidation", response.data[0]) return response.data[0] }) }, validateTask({commit}, options) { - return axios.post(`${apiUrl(this)}/flows/validate/task`, options.task, {...textYamlHeader, params: {section: options.section}}) + return axios.post(`${apiUrl(this)}/flows/validate/task`, options.task, {...textYamlHeader, withCredentials: true, params: {section: options.section}}) .then(response => { commit("setTaskError", response.data.constraints) return response.data