httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 57451] New: TRIVIAL: Add specifier to the Header/RequestHeader to provide IP address of the client (early or late)
Date Sat, 17 Jan 2015 13:07:27 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=57451

            Bug ID: 57451
           Summary: TRIVIAL: Add specifier to the Header/RequestHeader to
                    provide IP address of the client (early or late)
           Product: Apache httpd-2
           Version: 2.4.10
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: mod_headers
          Assignee: bugs@httpd.apache.org
          Reporter: alex@net13.info

Created attachment 32373
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=32373&action=edit
the trivial patch

I propose to add trivial enhancement to the mod_headers: allow to use client IP
in header value by using %a specifier. The patch is rather trivial too.

What it provides:

When used on frontend like

RequestHeader set X-Client-IP %a

It provides X-Client-IP header to pass through the proxy module (that is, if
you don't want to use X-Forwarder-For header for realip module, and proxy
module has no option to change the name). This variant works after realip, so
it retrieves the first client IP if used together with realip.

When used on backend like

RequestHeader set X-Frontend-IP %a early

it sets X-Frontend-IP header to the last frontend IP (direct IP) accessing this
server.

So it's useful to easily retrieve first/last IPs in forwarding sequence for
scripts.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message