generated from MeasureAuthoringTool/madie-frontend-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from MeasureAuthoringTool/MAT-4193a
MAT-4193a: Fixing WAF Intercept
- Loading branch information
Showing
1 changed file
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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("[email protected]") || | ||
JSON.stringify(error.response.data).includes("[email protected]")) | ||
error?.response?.headers["content-type"] | ||
.toLowerCase() | ||
.includes("text/html") && | ||
(JSON.stringify(error.response.data) | ||
.toLocaleLowerCase() | ||
.includes("[email protected]") || | ||
JSON.stringify(error.response.data) | ||
.toLowerCase() | ||
.includes("[email protected]")) | ||
) { | ||
// eslint-disable-next-line no-console | ||
console.log("WAF Interceptor Triggered"); | ||
|