Hi Marc,
Actually I managed to do it using Apache with mod_headers, because it was
pretty simple. In my architecture, I've the apache server and mod_jk to
redirect to the ApiMan.
RequestHeader set X-Forwarded-For "%{REMOTE_ADDR}s" (SSL)
RequestHeader set X-Forwarded-For "%{REMOTE_ADDR}e" (NO-SSL)
On 9 April 2018 at 07:50, Marc Savy <marc.savy(a)redhat.com> wrote:
Just to quickly follow up: did you have any success with this? Any
issues?
On 9 March 2018 at 16:18, Renato Barros <renalexster(a)gmail.com> wrote:
> Nice folks.
> I'll try do it.
>
> On Mar 9, 2018 12:17 PM, "Eric Wittmann" <eric.wittmann(a)redhat.com>
wrote:
>>
>> Note that, with just a little bit of java expertise, you can easily
create
>> your own policy plugin. The documentation for doing so is quite good
(IMO):
>>
>>
http://www.apiman.io/latest/developer-guide.html#_plugins
>>
>> Also there are plenty of examples here:
>>
>>
https://github.com/apiman/apiman-plugins
>>
>> You could start with the no-op policy (is a valid, working policy plugin
>> but doesn't do anything) and the simple-header-policy (does things with
>> headers).
>>
>> -Eric
>>
>>
>> On Fri, Mar 9, 2018 at 8:55 AM, Marc Savy <marc.savy(a)redhat.com> wrote:
>>>
>>> The simple header policy can't do that directly as I recall. As Eric
>>> suggests you should write your own custom policy to achieve this. It
>>> should be really simple -- probably just a few lines!
>>>
>>> On 7 March 2018 at 18:56, Eric Wittmann <eric.wittmann(a)redhat.com>
wrote:
>>> > I can't remember if there is a policy for this already. If not,
it's
>>> > fairly
>>> > trivial to write a custom policy. Thoughts Marc?
>>> >
>>> > On Wed, Mar 7, 2018 at 10:01 AM, Renato Barros <
renalexster(a)gmail.com>
>>> > wrote:
>>> >>
>>> >> Hi folks,
>>> >>
>>> >> I'd like to know if there is some way to add the Client remote
IP on
>>> >> my
>>> >> Request Header from API Man.
>>> >>
>>> >> I need to add a Simple Header Policy with a
"X-Forwarded-For"
>>> >> containing
>>> >> the client remote ip.
>>> >>
>>> >> My backend is getting the APIMan IP as remote client, but what I
need
>>> >> get
>>> >> to client IP.
>>> >>
>>> >> _______________________________________________
>>> >> Apiman-user mailing list
>>> >> Apiman-user(a)lists.jboss.org
>>> >>
https://lists.jboss.org/mailman/listinfo/apiman-user
>>> >>
>>> >
>>> >
>>> > _______________________________________________
>>> > Apiman-user mailing list
>>> > Apiman-user(a)lists.jboss.org
>>> >
https://lists.jboss.org/mailman/listinfo/apiman-user
>>> >
>>
>>
>