At this moment, the library takes the last found IP from the 'lookup' config key. In documentation there is written "Having in mind when the key is found inside the attribute, that key will be used.", and I believe it should be the first taken.
I'd go with this changes to the lookup() method:
private function lookup($type, $keys)
{
$value = null;
foreach ($keys as $key) {
if (request()->$type->has($key)) {
return request()->$type->get($key);
}
}
return $value;
}
At this moment, the library takes the last found IP from the 'lookup' config key. In documentation there is written "Having in mind when the key is found inside the attribute, that key will be used.", and I believe it should be the first taken.
I'd go with this changes to the
lookup()
method: