mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-30 14:56:11 +00:00
fix(sys-front-inj-design): store and link the role stylesheet per network
The design inject renders a role's style.css once per vhost but copied every render to one shared CDN path, so the last render won. xwiki's stylesheet embeds its own origin; on a multi-network node the onion render landed last and every clearnet page loaded onion URLs, failing network-leak.spec.js whenever the pass picked clearnet. The first network keeps style.css, every further network gets <label>-style.css (onion-style.css), keyed by the same rule the tls lookup uses for the render (serving_network), and each vhost links its own file. Single-network roles keep the exact old path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9e1cf40350
commit
01e27bfddb
13 files changed
+375
-12
No files matched your search
@@ -39,6 +39,11 @@ class TestNetworkFilters(unittest.TestCase):
|
||||
)
|
||||
self.assertEqual(self.filters["in_network"](domains, "tor"), [f"a.{ONION}"])
|
||||
|
||||
def test_vhost_label_names_the_instance_of_the_vhost(self):
|
||||
domains = [f"a.{DOMAIN}", f"a.{ONION}"]
|
||||
self.assertEqual(self.filters["vhost_label"](domains, f"a.{DOMAIN}"), "")
|
||||
self.assertEqual(self.filters["vhost_label"](domains, f"a.{ONION}"), "onion")
|
||||
|
||||
def test_network_sibling_is_empty_without_a_node(self):
|
||||
self.assertEqual(
|
||||
self.filters["network_sibling"](DOMAIN, "tor", DOMAIN, ""),
|
||||
|
||||
Reference in new issue
Block a user