-
Notifications
You must be signed in to change notification settings - Fork 1
feat(rules): expose requester IP to JS (r.requester_ip) and scripts (HTTPJAIL_REQUESTER_IP) #25
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
Merged
+189
−74
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e860aeb
feat: add HTTPJAIL_REQUESTER_IP environment variable for scripts
ammario c55946f
Merge branch 'main' into add-requester-ip
blink-so[bot] 5214786
test: update RuleEngineTrait evaluate call sites to include requester_ip
blink-so[bot] ea45d44
chore(fmt): rustfmt after test updates
blink-so[bot] f067d26
fix(tests): remove diff artifacts in pattern.rs and add requester_ip
blink-so[bot] 90e0fd2
feat(rules/js): expose requester_ip to V8 engine and plumb through tr…
blink-so[bot] 6b6c7fd
docs(js): document r.requester_ip in JS API; impl requester_ip in V8 …
blink-so[bot] dcaa502
style: rustfmt after JS requester_ip changes
blink-so[bot] 4e414de
Merge branch 'main' into add-requester-ip
ammario 031d8a7
Merge branch 'main' into add-requester-ip
ammario 1e91f80
Update branch with base main
blink-so[bot] 1326aa7
Merge branch 'main' into add-requester-ip
ammario a25fe1d
Merge branch 'main' into add-requester-ip
ammario File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Update tests for new requester_ip parameter
The trait method
RuleEngineTrait::evaluate
now requires arequester_ip
argument, but the unit tests still invokeengine.evaluate(method, url)
with the old two-parameter signature (seesrc/rules/script.rs
andsrc/rules.rs
). Runningcargo test
will fail to compile until those call sites provide an IP value or the API offers a backwards-compatible wrapper. Consider updating the tests to pass a dummy IP so the suite builds again.Useful? React with 👍 / 👎.