Skip to content

Commit 9af4a63

Browse files
committed
add non secure option to ip stack driver
1 parent cd1ee5d commit 9af4a63

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Drivers/IpStackDriver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ public function getRaw($ip)
7575
*/
7676
protected function getUrl($ip)
7777
{
78-
return 'https://api.ipstack.com/'.$ip.'?access_key='.Arr::get($this->config, 'key');
78+
$protocol = 'http'.(Arr::get($this->config, 'secure') ? 's' : '');
79+
80+
return $protocol.'://api.ipstack.com/'.$ip.'?access_key='.Arr::get($this->config, 'key');
7981
}
8082
}

src/config/config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,6 @@
9292
|
9393
*/
9494
'key' => env('GEOIP_TELIZE_KEY'),
95+
'secure' => env('GEOIP_IPSTACK_SECURE', true),
9596
],
9697
];

0 commit comments

Comments
 (0)