Users were generally confused about where to configure things like
allowed URLs. Because they were reset in between each sessions, they
needed to be applied repeatedly in a before block.
This introduces an API for global configuration, which will be applied
for every session. It also deprecates the per-session configuration
methods, as those are less likely to be useful.
We attempted to track in-progress replies and abort them in 1.5.1.
However, sometimes these replies are destroyed unexpectedly, so
attempting to abort them raises errors.
This commit tracks when replies are destroyed and removes them from the
queue of in-progress replies.
* Adds `allow_url`, `block_url`, and `block_unknown_url` methods.
* Both allow_url and block_url accept wildcards.
* Any requests to blocked URLs will be blocked immediately.
* Blocked URLs take precedence over allowed URLs.
* By default, any requests to localhost and 127.0.0.1 are allowed.
* By default, any requests to unknown hosts will print a warning.
* `block_unknown_urls` causes unknown hosts to be silently blocked.
* `blacklisted_urls=` is deprecated in favor of `block_url`.