set_real_ip_from --how to load IP list file ?

CJ Ess zxcvbn4038 at
Mon Nov 9 03:38:06 UTC 2015

He has a point - if your using multiple CDNs you can have many dozens of
addresses for the real_ip module - it would be nice to be able to source
them from a file.

Also last I checked the real_ip module did a linear search through all the
addresses configured, its not an issue yet but at some point it would be
worth changing that to some sort of tree structure.

On Sun, Nov 8, 2015 at 9:03 PM, Reinis Rozitis <r at> wrote:

> I'm using CDN with my site.
>> There are many IPs on network.
>> set_real_ip_from only can add IP in one line.
> set_real_ip_from supports subnet masks, so you can more or less achieve
> the same as in apache.
> If you want an external file you can use include (
> ) just in the file
> prefix each line with set_real_ip_from.
> p.s. some CDNs even provide copy/paste configurations ( like
> )
> rr
> _______________________________________________
> nginx mailing list
> nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list