December 25, 2019 06:18AM
On Tue, Dec 24, 2019 at 08:00:26PM +0100, Marcin Kozlowski wrote:
> Thanks.
>
> Works. For the reference, this is the code I used:
>
> ngx_uint_t n;
> ngx_table_elt_t **h;
> ngx_array_t a;
> a = req->headers_in.x_forwarded_for;
> n = a.nelts;
> h = a.elts;
>
>
> for (i = 0; i<n; i++) {
> ngx_log_error(NGX_LOG_ERR, req->connection->log,
> 0, "x_forwarded_for: %s", h[i]->value.data);
> }
>
> BTW What would be the best practice in NGINX NASIX module or any other
> module to load a file with hundreds entries of IPs (hashmap, or what
> structure would be best?) which should be whitelisted later for comparison
> in NASIX module logic. Those IP should never be blocked by NAXSI.
>
> When should I load this file in memory, in which component
> /module/function/step?
>
> Links to some guides/sample code would be also appreciated.
>
> Thanks,

http://nginx.org/en/docs/http/ngx_http_geo_module.html
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

nginx - get value of the header - x_forwarded_for in Nginx module (Naxsi)

Marcin Kozlowski 603 December 23, 2019 05:06PM

Re: nginx - get value of the header - x_forwarded_for in Nginx module (Naxsi)

ru@nginx.com 385 December 24, 2019 04:38AM

Re: nginx - get value of the header - x_forwarded_for in Nginx module (Naxsi)

Marcin Kozlowski 312 December 24, 2019 02:02PM

Re: nginx - get value of the header - x_forwarded_for in Nginx module (Naxsi)

ru@nginx.com 411 December 25, 2019 06:18AM

Re: nginx - get value of the header - x_forwarded_for in Nginx module (Naxsi)

Marcin Kozlowski 301 December 27, 2019 05:44PM

Re: nginx - get value of the header - x_forwarded_for in Nginx module (Naxsi)

Marcin Kozlowski 296 December 28, 2019 09:38AM

Re: nginx - get value of the header - x_forwarded_for in Nginx module (Naxsi)

Marcin Kozlowski 289 December 28, 2019 02:36PM

Re: nginx - get value of the header - x_forwarded_for in Nginx module (Naxsi)

Robert Paprocki 298 December 28, 2019 03:50PM

Re: nginx - get value of the header - x_forwarded_for in Nginx module (Naxsi)

Hung Nguyen 296 December 28, 2019 09:28PM

Re: nginx - get value of the header - x_forwarded_for in Nginx module (Naxsi)

Marcin Kozlowski 286 December 30, 2019 10:50AM

Re: nginx - get value of the header - x_forwarded_for in Nginx module (Naxsi)

Marcin Kozlowski 329 December 30, 2019 04:46PM

Re: nginx - get value of the header - x_forwarded_for in Nginx module (Naxsi)

Aaron Bedra 422 January 05, 2020 12:54AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 244
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