Skip to content

Commit 00a095f

Browse files
committed
Clarify left-wildcard usage.
1 parent b6ee914 commit 00a095f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ruleset-style.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ To that end, here are some style guidelines for writing or modifying rulesets.
77
They are intended to help and simplify in places where choices are ambiguous,
88
but like all guidelines they can be broken if the circumstances require it.
99

10+
Avoid using the left-wildcard ("target host='*.example.com'") for unless you
11+
really mean it. Many rules today specify a left-wildcard target, but the
12+
rewrite rules only rewrite an explicit list of hostnames.
13+
1014
Prefer listing explicit target hosts and a single rewrite from "^http:" to
1115
"^https:". This saves you time as a ruleset author because each explicit target
1216
host automatically creates a test URL, reducing the need to add your own test
13-
URLs.
17+
URLs. These also make it easier for someone reading the ruleset to figure out
18+
which subdomains are covered.
1419

15-
If all subdomains of a given domain support HTTPS, go ahead and use a
20+
If you know all subdomains of a given domain support HTTPS, go ahead and use a
1621
left-wildcard, along with a plain rewrite from "^http:" to "^https:". Make sure
1722
to add a bunch of test URLs for the more important subdomains. If you're not
1823
sure what subdomains might exist, check the 'subdomain tab on Wolfram Alpha:

0 commit comments

Comments
 (0)