Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task/remove cbnotif from correlator #537

Merged
merged 7 commits into from
Jul 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Fix: remove cbnotif from correlator (#536)
Fix: failed rules updatescounter not working in metrics API
Fix: return error 400 from perseo-core instead of 500 (#539)
Update ngsijs dep from 1.2.1 to 1.3.0
Expand Down
3 changes: 2 additions & 1 deletion lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ module.exports = {
AUTH_HEADER: 'X-Auth-Token',
REALIP_HEADER: 'X-Real-IP',
TOTAL_COUNT_HEADER: 'fiware-total-count',
COMPONENT_NAME: 'perseo-fe'
COMPONENT_NAME: 'perseo-fe',
CB_NOTIF_REGEX: / cbnotif=\d;/g
};
2 changes: 2 additions & 0 deletions lib/routes/actionsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ function PostAction(req, resp) {
metrics.IncMetrics(req.service, req.subservice, metrics.firedRules);

if (correlator) {
// remove " cbnotif=X;" from correlator
correlator = correlator.replace(constants.CB_NOTIF_REGEX, '');
// try detect loop
corrAge[correlator] = now;
rulesWithCorr = recentAxn[correlator];
Expand Down