Welcome! Log In Create A New Profile

Advanced

Re: Feature idea: retrieve set_real_ip_from (HttpRealipModule) from a text file online

Lorenzo Raffio
December 30, 2012 03:20PM
Uhm, you're right.

Anyway if can be useful for others in the future here's the script to fetch
2 files and mix 'em together preserving the set_real_ip_from formatting:
{
curl -s https://www.cloudflare.com/ips-v4
printf '\n'
curl -s https://www.cloudflare.com/ips-v6
} | sed -r 's/^(.+)$/set_real_ip_from \1;/g' > some-list.conf && nginx -s
reload


2012/12/30 Lorenzo Raffio <multiformeingegno@gmail.com>

> The idea is to have it built-in, without having to arrange a script that
> fetches an external file and appends each line to set_real_ip_from and
> adds a ;
> It would be a hundreds bytes add and IMO would help many. It's just an
> idea anayway.
>
>
> 2012/12/30 Lorenzo Raffio <multiformeingegno@gmail.com>
>
>> What about adding the possibility to retrieve a list of set_real_ip_from
>> from a text file online? I'm thinking about CloudFlare, that provides this
>> 2 files (plain text): https://www.cloudflare.com/ips-v4 and
>> https://www.cloudflare.com/ips-v6
>>
>> It could be useful also for other big projects where nginx is used as
>> proxy.
>>
>
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Feature idea: retrieve set_real_ip_from (HttpRealipModule) from a text file online

Lorenzo Raffio December 29, 2012 08:40PM

Re: Feature idea: retrieve set_real_ip_from (HttpRealipModule) from a text file online

Francis Daly December 30, 2012 06:32AM

Re: Feature idea: retrieve set_real_ip_from (HttpRealipModule) from a text file online

Lorenzo Raffio December 30, 2012 08:34AM

Re: Feature idea: retrieve set_real_ip_from (HttpRealipModule) from a text file online

Edho Arief December 30, 2012 09:34AM

Re: Feature idea: retrieve set_real_ip_from (HttpRealipModule) from a text file online

Lorenzo Raffio December 30, 2012 03:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 196
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready