Skip to content

Commit

Permalink
Merge pull request #2671 from dusk-network/fix-geoip
Browse files Browse the repository at this point in the history
rusk: fix geoip endpoint
  • Loading branch information
herr-seppia authored Oct 14, 2024
2 parents e0f0962 + 4ea9bef commit 6d235a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rusk/src/lib/http/chain/geo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ impl RuskNode {
let ip = n.ip();

let url = match std::env::var("IP_API_KEY") {
Ok(key) => format!("https://ip-api.com/json/{ip}?key={key}"),
Ok(key) => {
format!("https://pro.ip-api.com/json/{ip}?key={key}")
}
Err(_) => format!("http://ip-api.com/json/{ip}"),
};
if let Ok(v) = client.get(url).send().await {
Expand Down

0 comments on commit 6d235a8

Please sign in to comment.