Skip to content

Commit

Permalink
update log for exclude API
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitsuthar committed Oct 9, 2024
1 parent 152da07 commit 15cfbac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/instrumentation-security/core/request-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ function getRequestFromId(id) {
* @param {*} requestData
*/
function setRequest(id, requestData) {
if (API.getSecAgent().status.getStatus() != 'active') {
return;
}

requestMap.set(id, requestData);
try {
const stringToMatch = requestData.url;
// const filteredString = stringToMatch.split('?')[0];
const filteredString = stringToMatch;
const filteredString = stringToMatch;
let isRegexMatchestoURL = false;
for (let index = 0; index < regexPatterns.length; index++) {
const regex = new RegExp(regexPatterns[index], 'gm');
Expand All @@ -45,7 +43,9 @@ function setRequest(id, requestData) {
}
if (isRegexMatchestoURL) {
requestMap.delete(id);
logger.debug("Excluding URL %s from IAST processing due to ignore API setting", filteredString);
if (API.getSecAgent().status.getStatus() !== 'disabled') {
logger.debug("Excluding URL %s from IAST processing due to ignore API setting", filteredString);
}
}
} catch (error) {
logger.debug("Error while processing API regex for restriction", error);
Expand Down

0 comments on commit 15cfbac

Please sign in to comment.