Skip to content

Commit

Permalink
Merge pull request kubernetes#1323 from sethpollack/white_list_real_ip
Browse files Browse the repository at this point in the history
use $the_real_ip for rate limit whitelist
  • Loading branch information
aledbf authored Sep 13, 2017
2 parents ca0df3a + 693a588 commit 981967b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ http {
{{ end }}

sendfile on;

aio threads;
aio_write on;

Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit 981967b

Please sign in to comment.