Despamilator.Allowlist (Despamilator v2.1.5)

Copy Markdown View Source

Allow-list of domains whose URLs should not be penalised by URL-aware filters.

Configure via:

config :despamilator_elixir_elixir,
  url_allowlist: [
    "pakwheels.com",
    "google.com",
    ~r/\.(gov|edu)\b/
  ]

String entries match the host suffix (so pakwheels.com allows www.pakwheels.com and forums.pakwheels.com). Regex entries match anywhere in the lowercased host.

Filters that consult the allow-list:

Summary

Functions

Returns the configured allow-list.

True if host (e.g. "www.example.com") is allow-listed.

Returns text with every URL whose host is allow-listed replaced by a single space. Used by URL-aware filters to skip trusted domains entirely.

Functions

entries()

Returns the configured allow-list.

host_allowed?(host)

True if host (e.g. "www.example.com") is allow-listed.

strip(text)

Returns text with every URL whose host is allow-listed replaced by a single space. Used by URL-aware filters to skip trusted domains entirely.