这是indexloc提供的服务,不要输入任何密码
Skip to content

[Feature] Option to make dynamic rules use the page base domain for the rule source instead of the full hostname #3297

@mgziminsky

Description

@mgziminsky

Filter issues MUST NOT be reported here. Read first: https://github.com/gorhill/uBlock/blob/master/CONTRIBUTING.md

Describe the issue

The documentation for dynamic rules of type 1p-script, 3p, 3p-script, and 3p-frame states that they apply to:

"... pulled from the same domain name of the current web page"

However, the popup creates rules scoped to the full hostname of the site, not the most parent domain. This is inconvenient on sites that use several hostnames because you have to create the same rule for each hostname. You can add the rule for the parent domain manually, but ideally the popup ui should create the rule as described.

The behavior I was expecting, and believe to be most intuitive, is to have the relevant type-based rules use the domain, and the individual hostname rules use the hostname. That way, you can choose 1p-script to apply to the "whole" site, or you could select the hostname rule to only apply to the current page hostname. This will also improve sites that load resources/scripts from a 1st-party sub-domain when defining 1p-script rules.

One or more specific URLs where the issue occurs

www.fidelity.com
oltx.fidelity.com
scs.fidelity.com
etc.

Screenshot in which the issue can be seen

Rules:
rules

Results:
results

Desired
desired

Steps for anyone to reproduce the issue

On a site that uses several hosts, such as fidelity.com, use the popup to create a local dynamic filter rule for 1p-script/3p*. Using the site normally will occasionally navigate to one of the other subdomains, and the previously created rules will no longer apply. This also applies to sites that load there resources from a 1st-party sub-domain, of which I can't remember any examples.

Your settings

Default settings except for enable "I am an advanced user" for access to dynamic filtering

  • OS/version: Win 10 x64
  • Browser/version: Firefox 57, Chrome 62.0.3202.94
  • uBlock Origin version: 1.14.20
Your filter lists

Default filter lists

Your custom filters (if any)

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions