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
@@ -14,6 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = fetchApi;
const lodash_1 = __importDefault(require("lodash"));
const get_csrf_header_name_1 = __importDefault(require("../../utils/get-csrf-header-name"));
/**
* # Fetch API
*/
@@ -27,7 +28,7 @@ localStorageCSRFKey) {
"Content-Type": "application/json",
};
if (csrf && csrfValue) {
finalHeaders[`${csrfValue.replace(/\"/g, "")}`] = "true";
finalHeaders[(0, get_csrf_header_name_1.default)()] = csrfValue;
}
if (typeof options === "string") {
try {