Provides methods to access MaxMind GeoIP2 API (http://maxmind.github.io/GeoIP2-java/) Some code for getIpAddress has been taken from https://github.com/donbeave/grails-geoip/ Download City DB from https://dev.maxmind.com/geoip/geoip2/geolite2/ DB Download should be automated and installed to grailsApplication.config.geopip.database.path as part of ala-install ansible playbooks
| Type | Name and description |
|---|---|
java.lang.Object |
grailsApplication |
static java.util.List<java.lang.String> |
ipHeaders |
com.maxmind.geoip2.DatabaseReader |
reader |
| Type Params | Return Type | Name and description |
|---|---|---|
|
com.maxmind.geoip2.record.Location |
getLocation(javax.servlet.http.HttpServletRequest request)gets Obtains the Location for a client request |
|
void |
init() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
gets Obtains the Location for a client request
request - the client request