Add 'no-brotli-accepted' filter which prevents the unsupported Brotli compression
authorFabian Keil <fk@fabiankeil.de>
Fri, 29 May 2020 07:09:38 +0000 (09:09 +0200)
committerFabian Keil <fk@fabiankeil.de>
Fri, 29 May 2020 07:50:05 +0000 (09:50 +0200)
default.action.master
default.filter

index 24d62e7..728753a 100644 (file)
 #    Client-header filters predefined in the supplied default.filter include:
 #
 #     hide-tor-exit-notation: Removes the Tor exit node notation in Host and Referer headers.
+#     no-brotli-accepted:     Strips "br" from the Accept-Encoding header
 #     privoxy-control:        Removes X-Privoxy-Control headers.
 #
 # +client-header-tagger{string}
index 548befe..6288488 100644 (file)
@@ -743,6 +743,16 @@ CLIENT-HEADER-FILTER: hide-tor-exit-notation Removes the Tor exit node notation
 
 s@^((?:Referer|Host):\s*(?:https?://)?[^/]*)\.[^\./]*?\.exit@$1@i
 
+#################################################################################
+#
+# no-brotli-accepted: Strips "br" from the Accept-Encoding header as Privoxy
+#                     currently doesn't support Brotli.
+#
+#################################################################################
+CLIENT-HEADER-FILTER: no-brotli-accepted Strip "br" from Accept-Encoding header
+
+s@(^Accept-Encoding:.*?)(?:br, |, br|br)@$1@i
+
 #################################################################################
 #
 # less-download-windows: Prevents annoying download windows for content types