Fixed the bug related to bypass rules not working which was basically passing empty bypass rule in the GetOutgoing function in the Start method of the recorder.
Concatenation of bypass rules and the extended version of bypass rule - Filter, and modification of function arguments taking []config.BypassRule to []config.Filters.
Addition of support to perform bypass based on URL methods and Headers in isPassThrough function.
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Code style update (formatting, local variables)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
Please let us know if any test cases are added
NA
Checklist:
[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[ ] I have added tests that prove my fix is effective or that my feature works.
[ ] New and existing unit tests pass locally with my changes.
Testcases Working
For flask-mongo application,
Specifying path and port only in filters,
filters: [
{
path: "/students",
port: 6000,
}
]
The following curl requests aren't being recorded,
curl -k -v http://127.0.0.1:6000/students
curl -X POST http://localhost:6000/students \
-H "Content-Type: application/json" \
-d '{"name": "Working John Doe", "age": 21}'
Related Issue
Closes: #1827
Describe the changes you've made
GetOutgoing
function in theStart
method of the recorder.[]config.BypassRule
to[]config.Filters
.isPassThrough
function.Type of change
Please let us know if any test cases are added
NA
Checklist:
Testcases Working
For flask-mongo application,
The following curl requests aren't being recorded,
The following curl requests aren't being recorded,
The following curl request is being recorded,
The following curl requests aren't being recorded,
The following curl request is being recorded,
Specifying header in filter,
The following curl requests aren't being recorded,
The following curl requests are being recorded,
Specifying header without URL method in filter,
The following curl requests aren't being recorded,
The following curl requests are being recorded,
Screenshots (if any)
NA