use $the_real_ip for rate limit whitelist

This commit is contained in:
Seth Pollack 2017-09-08 17:00:52 -04:00
parent 7b4d8cb1c3
commit 693a588175

View file

@ -50,7 +50,7 @@ http {
{{ end }}
sendfile on;
aio threads;
aio_write on;
@ -303,7 +303,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 }}