From 491a30148fecb91999685a23d3d8a5de858c0d16 Mon Sep 17 00:00:00 2001
From: Robert Schaefer <robert.schaefer@student.hpi.de>
Date: Sun, 4 Feb 2018 12:16:46 +0100
Subject: [PATCH] Avoid ipdata lookup headers at root level

suggested by @alexreisner
---
 lib/geocoder/lookups/ipdata_co.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/geocoder/lookups/ipdata_co.rb b/lib/geocoder/lookups/ipdata_co.rb
index a8e0bf00..0e18fd83 100644
--- a/lib/geocoder/lookups/ipdata_co.rb
+++ b/lib/geocoder/lookups/ipdata_co.rb
@@ -19,7 +19,7 @@ module Geocoder::Lookup
     private # ---------------------------------------------------------------
 
     def results(query)
-      Geocoder.configure(:http_headers => { "api-key" => configuration.api_key }) if configuration.api_key
+      Geocoder.configure(:ipdata_co => {:http_headers => { "api-key" => configuration.api_key }}) if configuration.api_key
       # don't look up a loopback address, just return the stored result
       return [reserved_result(query.text)] if query.loopback_ip_address?
       # note: Ipdata.co returns plain text on bad request
-- 
GitLab