james icon indicating copy to clipboard operation
james copied to clipboard

Allow URLs to be blocked

Open mitchhentges opened this issue 9 years ago • 2 comments

Allow a "blacklist" of URLs that shouldn't be loaded.

@nerdbeere, this is sourced from the list of issues in #1. What content should the consumer get? Maybe a simple response with code 502? Maybe 451 :wink:?

mitchhentges avatar Feb 24 '16 23:02 mitchhentges

I think the initial idea was to emulate the behavior of adblockers. They use an extension api to block requests which we can't do as we don't have access to the browser. It doesn't really matter which code we send, everything could lead to an unexpected result here. Depending on the application catching the error.

nerdbeere avatar Jun 03 '17 08:06 nerdbeere

Hmm, we could just cancel the connection, I believe that that's how Ad-blockers "do". At least Ublock Origin causes a net::ERR_BLOCKED_BY_CLIENT error in the console: 2017-06-03-120458_789x152_scrot

mitchhentges avatar Jun 03 '17 19:06 mitchhentges