improve ruleset unmarshalling behavior if there isnt a top level rule key

This commit is contained in:
Kevin Pham
2023-12-09 08:37:23 -06:00
parent 27c3892b0b
commit 22533dc739
6 changed files with 58 additions and 6 deletions

View File

@@ -45,7 +45,7 @@ func NewProxySiteHandler(opts *ProxyOptions) fiber.Handler {
).
AddResponseModifications(
tx.ForwardResponseHeaders(),
//tx.BlockThirdPartyScripts(),
tx.BlockThirdPartyScripts(),
tx.DeleteIncomingCookies(),
tx.DeleteLocalStorageData(),
tx.DeleteSessionStorageData(),
@@ -54,7 +54,7 @@ func NewProxySiteHandler(opts *ProxyOptions) fiber.Handler {
tx.RewriteHTMLResourceURLs(),
tx.PatchDynamicResourceURLs(),
tx.PatchTrackerScripts(),
tx.BlockElementRemoval(".article-content"), // techcrunch
//tx.BlockElementRemoval(".article-content"), // techcrunch
//tx.BlockElementRemoval(".available-content"), // substack
// tx.SetContentSecurityPolicy("default-src * 'unsafe-inline' 'unsafe-eval' data: blob:;"),
)