From d5f4dab0eb22bc53941effde13f17f6e8a0685b4 Mon Sep 17 00:00:00 2001 From: sara-pervana Date: Sun, 28 Jan 2024 18:07:39 +0100 Subject: [PATCH] added headers for axios requests --- pkgs/ui/src/components/consume_action/index.tsx | 5 +++++ pkgs/ui/src/components/entity_actions/index.tsx | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/pkgs/ui/src/components/consume_action/index.tsx b/pkgs/ui/src/components/consume_action/index.tsx index 84f43a0..88b2c82 100644 --- a/pkgs/ui/src/components/consume_action/index.tsx +++ b/pkgs/ui/src/components/consume_action/index.tsx @@ -14,6 +14,11 @@ const ConsumeAction = ({ endpoint }: { endpoint: string }) => { url: endpoint, method: "GET", data: null, + withCredentials: true, + headers: { + "Content-Type": "application/json", + Accept: "application/json", + }, }; axios(axiosConfig) diff --git a/pkgs/ui/src/components/entity_actions/index.tsx b/pkgs/ui/src/components/entity_actions/index.tsx index 538f03c..5c31ce8 100644 --- a/pkgs/ui/src/components/entity_actions/index.tsx +++ b/pkgs/ui/src/components/entity_actions/index.tsx @@ -60,6 +60,11 @@ const EntityActions = ({ endpointData, rowData }: Props) => { url: endpoint, method: "GET", data: null, + withCredentials: true, + headers: { + "Content-Type": "application/json", + Accept: "application/json", + }, }; axios(axiosConfig)