From 0dfff8534c7eba8ed0d8b5bf0955234075bb26f8 Mon Sep 17 00:00:00 2001 From: Qiyun Dai Date: Wed, 16 Oct 2024 17:36:26 -0500 Subject: [PATCH] Revert "Update esp-controller.js (#257)" (#258) This reverts commit ce8c55fb92bb90f83f3003e5360888911d32a875. --- ecc/scripts/esp-controller.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ecc/scripts/esp-controller.js b/ecc/scripts/esp-controller.js index 2f581a6d..e6e28413 100644 --- a/ecc/scripts/esp-controller.js +++ b/ecc/scripts/esp-controller.js @@ -1,4 +1,4 @@ -import { getECCEnv, getSecret } from './utils.js'; +import { getECCEnv } from './utils.js'; export const getCaasTags = (() => { let cache; @@ -65,7 +65,6 @@ function waitForAdobeIMS() { export async function constructRequestOptions(method, body = null) { await waitForAdobeIMS(); - const clientIdentity = await getSecret(`${getECCEnv()}-client-identity`); const headers = new Headers(); const sp = new URLSearchParams(window.location.search); const devToken = sp.get('devToken'); @@ -76,7 +75,6 @@ export async function constructRequestOptions(method, body = null) { headers.append('Authorization', `Bearer ${authToken}`); headers.append('x-api-key', 'acom_event_service'); headers.append('content-type', 'application/json'); - headers.append('x-client-identity', clientIdentity); const options = { method, @@ -91,7 +89,6 @@ export async function constructRequestOptions(method, body = null) { export async function uploadImage(file, configs, tracker, imageId = null) { await waitForAdobeIMS(); - const clientIdentity = await getSecret(`${getECCEnv()}-client-identity`); const { host } = getAPIConfig().esp[getECCEnv()]; const sp = new URLSearchParams(window.location.search); const devToken = sp.get('devToken'); @@ -109,7 +106,6 @@ export async function uploadImage(file, configs, tracker, imageId = null) { xhr.setRequestHeader('x-image-kind', configs.type); xhr.setRequestHeader('x-api-key', 'acom_event_service'); xhr.setRequestHeader('Authorization', `Bearer ${authToken}`); - xhr.setRequestHeader('x-client-identity', clientIdentity); if (tracker) { xhr.upload.onprogress = (event) => {