From 227092b57acc886469e16bcc4c0d3256e86d3d1e Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Tue, 17 Nov 2026 14:44:00 +0100 Subject: feat(receiver): add source domain access rules Add persistent source block and allow lists with authenticated management, single-row and bulk blocking actions, and optional fail-closed allowlist mode. Reject disallowed sources before enqueueing and recheck policy in verification workers, while sharing canonical hostname normalization across receiver, sender, and configuration paths. --- webmentions_ssg/templates/source_domains.html | 68 +++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 webmentions_ssg/templates/source_domains.html (limited to 'webmentions_ssg/templates/source_domains.html') diff --git a/webmentions_ssg/templates/source_domains.html b/webmentions_ssg/templates/source_domains.html new file mode 100644 index 0000000..2db942f --- /dev/null +++ b/webmentions_ssg/templates/source_domains.html @@ -0,0 +1,68 @@ + +{% extends "base.html" %} + +{% block content %} +

Source domain rules

+

+ Entries match the named hostname and all of its subdomains (not similarly named domains). + Blocked domains always take precedence over allowed domains. Changes affect new + submissions and future verification attempts; existing mentions are not deleted. +

+

+ Allowlist mode is {{ "enabled" if allowlist_enabled else "disabled" }}. + Set SOURCE_ALLOWLIST_ENABLED = True in the server configuration to + accept only listed source domains. An empty enabled allowlist rejects all sources. +

+ {% for kind, entries in (("blocked", blocked), ("allowed", allowed)) %} +
+

{{ "Blocked" if kind == "blocked" else "Allowed" }} domains

+
+ +
+ + +
+
+ +
+
+ {% if entries %} + + + + + + + + + {% for entry in entries %} + + + + + {% endfor %} + +
DomainAction
{{ entry.domain }} +
+ + +
+
+ {% else %} +

No {{ kind }} domains.

+ {% endif %} +
+ {% endfor %} +{% endblock %} -- cgit v1.3.1