Merge pull request #1323 from sethpollack/white_list_real_ip

use $the_real_ip for rate limit whitelist
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-09-13 09:51:34 -07:00 committed by GitHub
commit 981967b05e

View file

@ -304,7 +304,7 @@ http {
{{ range $rl := (filterRateLimits $servers ) }}
# Ratelimit {{ $rl.Name }}
geo $whitelist_{{ $rl.ID }} {
geo $the_real_ip $whitelist_{{ $rl.ID }} {
default 0;
{{ range $ip := $rl.Whitelist }}
{{ $ip }} 1;{{ end }}