From 26459fb4ca619b675729b4bea7714914631dbb86 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Thu, 10 Mar 2022 11:42:44 +0100 Subject: treat "view-source:" pages as privileged --- common/misc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/misc.js b/common/misc.js index c06052a..e609fe0 100644 --- a/common/misc.js +++ b/common/misc.js @@ -85,8 +85,8 @@ const csp_header_regex = * case of `file://' protocol). */ #IF MOZILLA -const priv_reg = /^moz-extension:\/\/|^about:|^file:\/\/[^?#]*\/([?#]|$)/; +const priv_reg = /^moz-extension:\/\/|^about:|^view-source:|^file:\/\/[^?#]*\/([?#]|$)/; #ELIF CHROMIUM -const priv_reg = /^chrome(-extension)?:\/\/|^about:|^file:\/\/[^?#]*\/([?#]|$)/; +const priv_reg = /^chrome(-extension)?:\/\/|^about:|^view-source:|^file:\/\/[^?#]*\/([?#]|$)/; #ENDIF #EXPORT url => priv_reg.test(url) AS is_privileged_url -- cgit v1.2.3