From 89a1d9933b7cde9b0b0e959cb36cc726623de5fc Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 5 Jul 2024 16:18:22 -0400 Subject: [PATCH] remove unnecessary withCredentials - withCredentials is not part of the fetch api and was just being ignored --- app/adapters/application.js | 1 - app/components/workflow-files/index.js | 1 - app/services/doi.js | 1 - app/services/oa-manuscript-service.js | 1 - 4 files changed, 4 deletions(-) diff --git a/app/adapters/application.js b/app/adapters/application.js index 9579e060..11f5efbc 100644 --- a/app/adapters/application.js +++ b/app/adapters/application.js @@ -13,7 +13,6 @@ export default class ApplicationAdapter extends JSONAPIAdapter { get headers() { return { - withCredentials: true, 'X-XSRF-TOKEN': document.cookie.match(/XSRF-TOKEN\=([^;]*)/)['1'], }; } diff --git a/app/components/workflow-files/index.js b/app/components/workflow-files/index.js index f5bd6b93..e0a3cb6c 100644 --- a/app/components/workflow-files/index.js +++ b/app/components/workflow-files/index.js @@ -94,7 +94,6 @@ export default class WorkflowFiles extends Component { async uploadFile(FileUpload) { try { const response = await FileUpload.upload(ENV.fileServicePath, { - withCredentials: true, headers: { 'X-XSRF-TOKEN': document.cookie.match(/XSRF-TOKEN\=([^;]*)/)['1'], }, diff --git a/app/services/doi.js b/app/services/doi.js index 75a0ce00..cc6af54b 100644 --- a/app/services/doi.js +++ b/app/services/doi.js @@ -31,7 +31,6 @@ export default class DoiService extends Service { let rawResponse = yield fetch(url, { headers: { Accept: 'application/json; charset=utf-8', - withCredentials: 'include', 'X-XSRF-TOKEN': document.cookie.match(/XSRF-TOKEN\=([^;]*)/)['1'], }, }); diff --git a/app/services/oa-manuscript-service.js b/app/services/oa-manuscript-service.js index 07176e28..c8228262 100644 --- a/app/services/oa-manuscript-service.js +++ b/app/services/oa-manuscript-service.js @@ -32,7 +32,6 @@ export default class OAManuscriptService extends Service { method: 'GET', headers: { Accept: 'application/json; charset=utf-8', - withCredentials: 'include', 'X-XSRF-TOKEN': document.cookie.match(/XSRF-TOKEN\=([^;]*)/)['1'], }, })