This is a migrated thread and some comments may be shown as answers.

Filtering sessions and conditionaly adding paramter not working.

1 Answer 69 Views
Extensions and Customization
This is a migrated thread and some comments may be shown as answers.
Russell
Top achievements
Rank 1
Russell asked on 16 Aug 2018, 06:55 PM

Hey,

I creating a UI that has an input box to set a filter. It is then disabled and traffic should be filtered based on it. Along with filtering, any traffic that matches the filter text has a parameter added.

 

I think this should work in principle, but practice it is usually not working. It sometimes works and sometimes doesn't. Am I doing something wrong?

 

public void AutoTamperRequestBefore(Session oSession)
{
    if (null == View || View.TextBoxFilter.Enabled) return;
    if (oSession.fullUrl.Contains(View.TextBoxFilter.Text))
    {
        oSession.fullUrl += "&debug=1";
    }
    else
    {
        oSession.Ignore();
    }
}

1 Answer, 1 is accepted

Sort by
0
Russell
Top achievements
Rank 1
answered on 16 Aug 2018, 07:05 PM

I actually fixed it by not using the Ignore() method. Does anyone know why this was causing problems? I have a feeling it may not be performant?

Changed:

oSession.Ignore();

To:

oSession["ui-hide"] = "Extension Running";
Tags
Extensions and Customization
Asked by
Russell
Top achievements
Rank 1
Answers by
Russell
Top achievements
Rank 1
Share this question
or