From 123812f775fc5cbbf76b49a50543f5ea19641953 Mon Sep 17 00:00:00 2001 From: Ethan Kaplan Date: Thu, 7 Nov 2024 10:02:53 -0800 Subject: [PATCH] MAT-4193 remvoing case sensitivity --- src/util/wafIntercept.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/util/wafIntercept.ts b/src/util/wafIntercept.ts index ee6b6c4..fc08ae9 100644 --- a/src/util/wafIntercept.ts +++ b/src/util/wafIntercept.ts @@ -4,9 +4,15 @@ const wafIntercept = (error) => { // Check for WAF block if ( error?.response?.status === 403 && - error?.response?.headers["content-type"].includes("text/html") && - (JSON.stringify(error.response.data).includes("soc@hcqis.org") || - JSON.stringify(error.response.data).includes("QNET_SOC@CMS.HHS.GOV")) + error?.response?.headers["content-type"] + .toLowerCase() + .includes("text/html") && + (JSON.stringify(error.response.data) + .toLocaleLowerCase() + .includes("soc@hcqis.org") || + JSON.stringify(error.response.data) + .toLowerCase() + .includes("qnet_soc@cms.hhs.gov")) ) { // eslint-disable-next-line no-console console.log("WAF Interceptor Triggered");