improve ruleset unmarshalling behavior if there isnt a top level rule key
This commit is contained in:
@@ -513,6 +513,15 @@ var AllMods Modifiers = Modifiers{
|
||||
{Name: "val", Type: "string"},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "ModifyIncomingScriptsWithRegex",
|
||||
Description: "ModifyIncomingScriptsWithRegex modifies all incoming javascript (application/javascript and inline <script> in text/html) using a regex match and replacement.",
|
||||
CodeEditLink: "https://github.com/everywall/ladder/edit/origin/proxy_v2/proxychain/responsemodifiers/modify_incoming_scripts_with_regex.go",
|
||||
Params: []Param{
|
||||
{Name: "matchRegex", Type: "string"},
|
||||
{Name: "replacement", Type: "string"},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "SetResponseHeader",
|
||||
Description: "SetResponseHeader modifies response headers from the upstream server",
|
||||
|
||||
@@ -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:;"),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user