Welcome! Log In Create A New Profile

Advanced

Re: Questions about real ip module

Francis Daly
August 03, 2022 06:54PM
On Wed, Aug 03, 2022 at 02:58:59PM +0900, nanaya wrote:
> On Wed, Aug 3, 2022, at 07:34, Francis Daly wrote:
> > On Sat, Jul 30, 2022 at 05:13:52AM +0900, nanaya wrote:

Hi there,

> It looks like I tested it on location level. I guess it's similar behavior to real_ip_header inheritance you mentioned below?

Ah, I hadn't tested at location{} level.

I had thought it would basically be: wherever the real_ip_header that
is used is set, use the matching set_real_ip_from. But I see somewhat
confusing test results there now too.

So it's probably simplest to say that the current code works most clearly
when there is exactly one set of directives in the configuration.

If someone finds a use-case that they can't configure with the current
code, maybe that will inspire someone to change something.

> >> 2. does setting `real_ip_header '';` in a section effectively disable the module for the section?
> >
> > I don't see that it does; and I don't see that the documentation says
> > that it would. So I'd say "no, it does not".
>
> It seems to achieve the same effect though considering it's not really possible to send empty header (or is it?).

With the odd effective inheritance that I see, any "inner" directive
seems to be effectively ignored. So having an "inner" one with the empty
value should not make a difference.

But I do not understand fully what it is doing.

> Thanks. I've reworked the config so it's not needed anymore.

Good that you have a config that now works for you.

Cheers,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

Questions about real ip module

nanaya July 29, 2022 04:16PM

Re: Questions about real ip module

Francis Daly August 02, 2022 06:36PM

Re: Questions about real ip module

nanaya August 03, 2022 02:02AM

Re: Questions about real ip module

Francis Daly August 03, 2022 06:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 114
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready