Skip to content

Commit 3642460

Browse files
author
funkydude
committed
Use a separate const for cookie host matching
1 parent ddee9d0 commit 3642460

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

chromium/rules.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ function log(){}
77
const trivial_rule_to = "https:";
88
const trivial_rule_from_c = new RegExp("^http:");
99
const trivial_cookie_name_c = new RegExp(".*");
10+
const trivial_cookie_host_c = new RegExp(".*");
1011

1112
/**
1213
* A single rule
@@ -43,7 +44,8 @@ function Exclusion(pattern) {
4344
*/
4445
function CookieRule(host, cookiename) {
4546
if (host === ".*" || host === ".+" || host === ".") {
46-
this.host_c = trivial_cookie_name_c;
47+
// Some cookie rules trivially match any host.
48+
this.host_c = trivial_cookie_host_c;
4749
} else {
4850
this.host_c = new RegExp(host);
4951
}

0 commit comments

Comments
 (0)