-
Notifications
You must be signed in to change notification settings - Fork 126
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
Implements uBO style polyfills for requests redirects #29
Conversation
…direct` option Closes #27
@snyderp if you review Also added a test that checks parsing extracts all 110 resources for the snapshot of |
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.
I think it looks great! Thats a gadzooks for getting this done. One other request; could you update the README.md or similar to show how to use the feature? Or just what end points to use to consume the new resources file?
src/blocker.rs
Outdated
} | ||
Some(data_url.trim().to_owned()) | ||
} else { | ||
// TOOD: handle error - throw? |
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.
Could this be logged somehow, even if its just mirroring the "didn't understand filter: X" stuff the current lib does? Would be a nice, noisy reminder if there is some new filter format we don't support, something like that
Also, is this exposed through the node API? |
Updates README to demonstrate redirect handling, includes logging to stderr for some of the worse failure cases
6ae14dd
to
d6530eb
Compare
@snyderp should we merge and close? It is backwards-compatible, so don't see any harm in that, FFI and browser can be wired up in due course |
Yep, looks good to me, though it looks like there are some conflicts now. But I think the change is terrific! |
Make sure deserialization is backwards-comaptible by not deserializing redirect polyfill resources
Merged master to resolve conflicts Also to ensure deserialization is backwards compatible have to ignore deserializing of redirect resources for now - included the required changes, tagging @bbondy for review |
Switching to MessagePack for serialization to have a cleaner way of adding new fields to blocker structures over time - this works as intended with |
63c2eb4
to
7d64942
Compare
returns request content to use for requests matched on rules with
redirect
optionCloses #27