From be2ce49545613bf07c207c65c5f55e4d591bc1a8 Mon Sep 17 00:00:00 2001 From: Bryan Florkiewicz Date: Wed, 29 May 2024 14:38:24 -0400 Subject: [PATCH] Revert "Merge pull request #2844 from Hyperkid123/fe-request-origin-header" This reverts commit e8daa00c6657f3e8f5326e40906fa9f4b78a5d47, reversing changes made to babf03a329c3c341273cc2f9988b25ea28b946f0. --- src/utils/iqeEnablement.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/utils/iqeEnablement.ts b/src/utils/iqeEnablement.ts index 8076597fb..d24d84d50 100644 --- a/src/utils/iqeEnablement.ts +++ b/src/utils/iqeEnablement.ts @@ -11,8 +11,6 @@ import { gatewayErrorAtom } from '../state/atoms/gatewayErrorAtom'; let xhrResults: XMLHttpRequest[] = []; let fetchResults: Record = {}; -// this extra header helps with API metrics -const FE_ORIGIN_HEADER_NAME = 'x-rh-frontend-origin'; const DENIED_CROSS_CHECK = 'Access denied from RBAC on cross-access check'; const AUTH_ALLOWED_ORIGINS = [ location.origin, @@ -106,8 +104,6 @@ export function init(chromeStore: ReturnType, authRef: React // Send Auth header, it will be changed to Authorization later down the line this.setRequestHeader('Auth', `Bearer ${authRef.current.user?.access_token}`); } - - this.setRequestHeader(FE_ORIGIN_HEADER_NAME, 'hcc'); } // eslint-disable-line func-names if (iqeEnabled) { @@ -140,10 +136,6 @@ export function init(chromeStore: ReturnType, authRef: React request.headers.append('Authorization', `Bearer ${authRef.current.user?.access_token}`); } - if (!request.headers.has(FE_ORIGIN_HEADER_NAME)) { - request.headers.append(FE_ORIGIN_HEADER_NAME, 'hcc'); - } - const prom = oldFetch.apply(this, [request, ...rest]); if (iqeEnabled) { fetchResults[tid] = arguments[0];