I was having some errors with my nginx logs, because I have both external and internal access, so was getting geoip2.errors.AddressNotFoundError: The address 192.168.168.1 is not in the database.
I suspect that this should probably be handled better by geoip2, but in the meantime, I made a little check to simply ignore non-public IP addresses, and thought it might be useful
I was having some errors with my nginx logs, because I have both external and internal access, so was getting
geoip2.errors.AddressNotFoundError: The address 192.168.168.1 is not in the database.
I suspect that this should probably be handled better by geoip2, but in the meantime, I made a little check to simply ignore non-public IP addresses, and thought it might be useful