Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

IP Tracker Plugin

micro-ip-tracker example apps

Capture the IP address on incoming REST Requests via a filter.

The IP Address is stored in a thread local variable & available via QueryIPRetriever.getIPAddress();

 String ip =  QueryIPRetriever.getIpAddress();

Configuration

The IP Tracker will pull client IP Addresses forwarded via a vip. By default the following headers are checked

X-LB-Client-IP
X-Forwarded-For

To add an additional header use the property

 load.balancer.ip.forwarding.header=

By default all incoming requests are tracked, an array of endpoints can be speficied via the property ip.tracker.mappings

 ip.tracker.mappings=/*,/path1/*

To use

Simply add to the classpath

Maven Central

Maven

 <dependency>
    <groupId>com.oath.microservices</groupId>  
    <artifactId>micro-ip-tracker</artifactId>
    <version>x.yx</version>
 </dependency>

Gradle

compile 'com.oath.microservices:micro-ip-tracker:x.yz'