Won't block 3rd party properly
-
Ive been thinking about this, and im not sure this is an actual bug (in WebKit) but more of a limitation in the way it is implemented.
With the subdomain rule, you are blocking all third parties - which is happening.
but allowing some first party resources other subdomains and the top-level domain are actually first party resources, which it is also doing.I don't think there is a way to restrict resources to the specific domain/subdomain only - at least not via the APIs that Apple is providing.
-
hmm,
I might have spoke too soon.
there is maybe a rule I can use
but it may be too restrictive for most users....Im not sure how this could be implemented in a user friendly and non destructive way for most users.
Ill have a think about it and see if I can find a way to implement what you are hoping for, but not degrade the experience for everyone else (assuming the rule I mentioned does actually work :)) -
@SweetP That sounds good. Maybe an "advanced" switch in the options that enforces strict subdomain separation? The default could be current behaviour, but for savvy users, the switch would allow for more granularity.
Anyways, would be happy to test a beta of what you come up with. Let me know if I can help in any way.
-
@SweetP Might be a WebKit limitation sadly
If it turns out that the feature cannot be implemented, maybe it’s a better UI to have just the base domain be added when you click the +exception even if you are on a subdomain, since this would be the expected behavior. What do you think?
-
@SweetP Ok, so from what I could tell of the way Minim is writing its ruleset, the trigger “if-domain” with the wildcard * seems to make the root domain + all subdomains whitelist appear.
As per Apple’s docs, "if-domain | An array of strings to match to a URL's domain; limits the action to a list of specific domains. The values must be lowercase ASCII, or Punycode for non-ASCII. Add * in front to match domain and subdomains. You can't use this with unless-domain.”Would this mean that having Minim just add the if-domain without the wildcard * in front work as expected (i.e. to block just that specific subdomain) ?
This way, the user could either add * in front if he/she wants to block the root domain and be done with it or have more granular control by default.
Of course, there could be a small UI element (like a checkmark/asterisk icon or something similar) in front when adding a wildcard exception to the Minim list.
Would this work/be reasonable?
-
ok so Ive worked on this a little this morning.
and I have changed the default behaviour in Minim to only block the urls listed.
subdomains will be unaffected by rules.After lunch ill take a look add adding in support for the use of the
*
wild card prefix to also block all subdomains.These changes have the added benefit of speeding up url matching, which should improve performance
-
@SweetP said in Won't block 3rd party properly:
Also, currently domains with a wildcard will override subdomain rules…
I’ll see if there’s anything I can do about thatI would think this to the expected behaviour. Once the user adds a wildcard root domain all subdomain rules should be ignored.
It would be great if the ruleset would automatically be pruned once the user whitelists the root domain with the wildcard, but that’s a nice to have mostly. -
@SweetP Something seems to be wrong. The update just hit a moment ago and Minim seems to be blocking everything by default and ignores the Block Rules tab. Regardless of the options in Block Rules tab, the only rules written are the default
{ "trigger" : { "url-filter" : ".*" }, "action" : { "type" : "ignore-previous-rules" } }, { "trigger" : { "url-filter" : ".*" }, "action" : { "type" : "block" } },
I think the resource-type trigger field is missing from the default block rules and just the action (i.e. block) is being generated, thus blocking every URL.