Skip to content

Commit c57f950

Browse files
mdmowernikitaeverywhere
authored andcommitted
Fix domain matching in readme examples
Update the suggested regex patterns for subdomains: - subdomains only: Checking for `^.*` before a period is unnecessary. - domain and subdomains: the suggested pattern should have only matched example.com and *.example.com, but it actually allowed myexample.com. Fix the pattern.
1 parent 1191cba commit c57f950

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ APP__HOSTS_WHITELIST_REGEX="^(example\\.com|mysecondwebsite\\.com)$"
118118
# A JavaScript regular expression that the host must match. By default, it matches ANY HOST, MAKING
119119
# YOUR PROXY AVAILABLE TO ANYONE. Make sure you screen all special regexp characters here. Examples:
120120
# APP__HOSTS_WHITELIST_REGEX="^example\\.com$" (only the domain example.com is allowed to access the proxy)
121-
# APP__HOSTS_WHITELIST_REGEX="^.*\\.example\\.com$" (only subdomains of example.com are allowed)
122-
# APP__HOSTS_WHITELIST_REGEX="^.*\\.?example\\.com$" (example.com and all its subdomains are allowed)
121+
# APP__HOSTS_WHITELIST_REGEX="\\.example\\.com$" (only subdomains of example.com are allowed)
122+
# APP__HOSTS_WHITELIST_REGEX="(^|\\.)example\\.com$" (example.com and all its subdomains are allowed)
123123
# APP__HOSTS_WHITELIST_REGEX="^(example\\.com|mysecondwebsite\\.com)$" (multiple specified domains are allowed)
124124
```
125125

0 commit comments

Comments
 (0)