Move out geolocation logic from server