From 00261d049e96db9bd96fcd7248a4d36dbd36d99b Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Mon, 13 Oct 2025 14:31:14 -0400 Subject: [PATCH] fix(default-config): sometimes browsers don't send Upgrade-Insecure-Requests (#1189) Signed-off-by: Xe Iaso --- data/botPolicies.yaml | 8 +++++++- data/meta/default-config.yaml | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/data/botPolicies.yaml b/data/botPolicies.yaml index 25ed7af..9cdf68f 100644 --- a/data/botPolicies.yaml +++ b/data/botPolicies.yaml @@ -107,7 +107,6 @@ bots: - '"Sec-Fetch-Dest" in headers' - '"Sec-Fetch-Mode" in headers' - '"Sec-Fetch-Site" in headers' - - '"Upgrade-Insecure-Requests" in headers' - '"Accept-Encoding" in headers' - '( headers["Accept-Encoding"].contains("zstd") || headers["Accept-Encoding"].contains("br") )' - '"Accept-Language" in headers' @@ -115,6 +114,13 @@ bots: weight: adjust: -10 + # The Upgrade-Insecure-Requests header is typically sent by browsers, but not always + - name: upgrade-insecure-requests + expression: '"Upgrade-Insecure-Requests" in headers' + action: WEIGH + weight: + adjust: -2 + # Chrome should behave like Chrome - name: chrome-is-proper expression: diff --git a/data/meta/default-config.yaml b/data/meta/default-config.yaml index d239094..1b1ad1e 100644 --- a/data/meta/default-config.yaml +++ b/data/meta/default-config.yaml @@ -91,7 +91,6 @@ - '"Sec-Fetch-Dest" in headers' - '"Sec-Fetch-Mode" in headers' - '"Sec-Fetch-Site" in headers' - - '"Upgrade-Insecure-Requests" in headers' - '"Accept-Encoding" in headers' - '( headers["Accept-Encoding"].contains("zstd") || headers["Accept-Encoding"].contains("br") )' - '"Accept-Language" in headers' @@ -99,6 +98,13 @@ weight: adjust: -10 +# The Upgrade-Insecure-Requests header is typically sent by browsers, but not always +- name: upgrade-insecure-requests + expression: '"Upgrade-Insecure-Requests" in headers' + action: WEIGH + weight: + adjust: -2 + # Chrome should behave like Chrome - name: chrome-is-proper expression: