From fa51ddc304ef92ef131214223ebaf0c5320395fb Mon Sep 17 00:00:00 2001 From: Admin Date: Mon, 18 Aug 2025 15:02:33 +0700 Subject: [PATCH] disable CORS --- client/app/api/core-api-service.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/client/app/api/core-api-service.ts b/client/app/api/core-api-service.ts index 86a955f..81da17e 100644 --- a/client/app/api/core-api-service.ts +++ b/client/app/api/core-api-service.ts @@ -21,7 +21,7 @@ export class BaseApiService { const response = await axios({ url: this.resourceUrl, params: params, - withCredentials: true, + // withCredentials: true, method: "GET", }); @@ -32,7 +32,7 @@ export class BaseApiService { try { const response = await axios({ url: this.resourceUrl + "/" + id, - withCredentials: true, + // withCredentials: true, method: "GET", }); @@ -54,7 +54,7 @@ export class BaseApiService { const newData = removeUndefinedValues(data); const { data: result } = await axios({ url: this.resourceUrl, - withCredentials: true, + // withCredentials: true, method: "POST", data: newData, }); @@ -78,7 +78,7 @@ export class BaseApiService { const cleaned = removeUndefinedValues(data); const { data: result } = await axios({ url: `${this.resourceUrl}/${id}`, - withCredentials: true, + // withCredentials: true, method: "PUT", data: cleaned, }); @@ -97,7 +97,7 @@ export class BaseApiService { try { const { data } = await axios({ url: `${this.resourceUrl}/${entity.id}`, - withCredentials: true, + // withCredentials: true, method: "DELETE", }); @@ -118,7 +118,7 @@ export class BaseApiService { try { const { data } = await axios({ url: `${this.resourceUrl}/bulk-delete`, - withCredentials: true, + // withCredentials: true, method: "DELETE", data: { ids }, }); @@ -140,7 +140,7 @@ export class BaseApiService { try { const { data } = await axios({ url: `${this.resourceUrl}/bulk-update`, - withCredentials: true, + // withCredentials: true, method: "PUT", data: entities, }); @@ -168,7 +168,7 @@ export class BaseApiService { url: `${this.resourceUrl}/${endpoint}/${id}`, method: method || "POST", data: removeUndefinedValues(payload || {}), - withCredentials: true, + // withCredentials: true, }); if (options.toast_success) {