mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
Run 34421944328 odoo#0 loaded assets over the node onion that the page could not use. build_csp_header mirrors every clearnet token that carries the primary domain onto the node onion, but kept its scheme. Onion vhosts are served in plaintext, so a sibling like https://cdn.<onion> never matched the http://cdn.<onion> request it was meant to allow. Onion siblings now map https to http and wss to ws; the clearnet token is unchanged. The body filter rewrote external asset origins to the onion mirror only in HTML, so stylesheets kept pulling https://<origin> directly. When an app has tor enabled and external asset origins, the header filter now also flags text/css responses on .onion hosts (dropping Content-Length, since the body changes), and the body filter runs those through the same buffer and mirror rewrite and returns before the HTML injections. The flag is set under the same Jinja condition that renders the mirror block, so a flagged response always has a rewrite to run. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>