fix: server-side HTML URL rewriting to bypass CSP blocking
Build and Push to GHCR / build-and-push (push) Has been cancelled

JS injection fails on sites with strict Content-Security-Policy
(e.g. GitHub). Add golang.org/x/net/html-based server-side rewriting
of URL attributes (href/src/action/etc.) and CSS url() values before
response is sent. Keep JS injection as fallback for dynamic content.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <[email protected]>
This commit is contained in:
Agent
2026-05-24 17:44:35 +08:00
co-authored by HAPI
parent f03eacaf20
commit f13f294d04
5 changed files with 144 additions and 3 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
module mirror-proxy
go 1.23
go 1.25.0
require golang.org/x/net v0.55.0