Skip to content

Commit 2cbac3f

Browse files
authored
Merge pull request sameersbn#3124 from kkimurak/docs/fix-quoting-note-for-RACK_ATTACK_WHITELIST
Docs: fix RACK_ATTACK_WHITELIST section (quoting)
2 parents a4d9686 + 7684af9 commit 2cbac3f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2490,14 +2490,14 @@ Enable/disable rack middleware for blocking & throttling abusive requests Defaul
24902490

24912491
Always allow requests from whitelisted host.
24922492
This should be a valid yaml sequence of host address. Each host address string must be a valid IP address that can be passed to `IPAddr.new` of ruby. See [ruby-lang reference](https://docs.ruby-lang.org/en/3.0/IPAddr.html#method-c-new) for detail.
2493-
If you need to set multiple hosts, set this parameter like `["1.1.1.1","192.168.0.0/24"]` for example. In docker-compose.yml, you have to quote whole value like below:
2493+
If you need to set multiple hosts, set this parameter like `["1.1.1.1","192.168.0.0/24"]` for example.
24942494

24952495
````yaml
24962496
environment:
2497-
# pattern 1: surround with single quote, double quote each IP address
2498-
- RACK_ATTACK_WHITELIST='["1.1.1.1","192.168.0.0/24"]'
2499-
# pattern 2: surround with double quote, single quote each IP address
2500-
- RACK_ATTACK_WHITELIST="['1.1.1.1','192.168.0.0/24']"
2497+
# pattern 1: `- key=value` style : you can specify array of hosts as is
2498+
- RACK_ATTACK_WHITELIST=["1.1.1.1","192.168.0.0/24"]
2499+
# pattern 2: `key: value` style : you must surround with quote, as the value of environment variable must not be an array
2500+
RACK_ATTACK_WHITELIST: "['1.1.1.1','192.168.0.0/24']"
25012501
````
25022502

25032503
Defaults to `["127.0.0.1"]`

0 commit comments

Comments
 (0)