This commit is contained in:
Benjamin Toby
2025-01-14 08:41:57 +01:00
parent 285d3b8369
commit 7551749784
9 changed files with 45 additions and 39 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import _ from "lodash";
import getCsrfHeaderName from "../../utils/get-csrf-header-name";
type FetchApiOptions = {
method:
@@ -46,7 +47,7 @@ export default async function fetchApi(
} as FetchHeader;
if (csrf && csrfValue) {
finalHeaders[`${csrfValue.replace(/\"/g, "")}`] = "true";
finalHeaders[getCsrfHeaderName()] = csrfValue;
}
if (typeof options === "string") {