Re: Re: mod_rewrite: Conditionally set RemoteIPHeader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 11, 2025 at 6:48 PM <apache@xxxxxxxxxxxxxx> wrote:
>
> Does anyone know of a way to conditionally set the RemoteIPHeader
> directive for mod_remoteip? I've tried a few things; a simple if/else
> says "RemoteIPHeader is not allowed here." And trying to set my own
> request header that I can point "RemoteIPHeader" to doesn't seem to
> work; no matter how I order it or create it it seems that RemoteIPHeader
> doesn't recognize the new header I've generated.
>
> Any ideas?
>
> Thanks in advance!

Doesn't look viable. mod_remoteip does its work very early during
ap_run_post_read_request() which happens before things like If or
other configuration sections have been processed or even mod_setenvif
rules without the obscure --early flag.

I think you'd have to extend the module such that RemoteIPHeader could
accept an expression that is evaluated (like e.g. mod_headers values
of expr=or setenvifexpr

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux