Skip to content

Support domain-level blacklist (dmca-domains.json) #24

Description

@feruzm

The image/proxy blacklist currently matches exact source URLs only. When many images from a single external host need to be blocked, every URL has to be enumerated and listed individually, and any URL from the same host that was not spotted stays servable.

Add a third blacklist type for source domains:

  • fetch blacklist.domains_url (default https://ecency.com/dmca/dmca-domains.json, same 30-min TTL as the existing lists) and merge with a static blacklist-domains.json fallback, same pattern as images/accounts
  • a URL is blocked when its hostname equals a listed domain or is a subdomain of one
  • enforce in the same place as the exact-URL list (before proxy-store lookup, serving the default image) and skip upstream fetches for blacklisted domains in the avatar/cover fallback chain

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions