IonicaBizau / node-ipinfo

:globe_with_meridians: An http://ipinfo.io NodeJS wrapper.
MIT License
57 stars 24 forks source link

fix invalid URL format when token is used with no type info #33

Closed bfour closed 3 years ago

bfour commented 3 years ago

url = ipInfo.HOSTNAME_SSL + "/json" + ipInfo.TOKEN_PREFIX + token creates https://ipinfo.io//json because ipInfo.HOSTNAME_SSL = "https://ipinfo.io/"; which leads to Cannot GET //json etc.

Only thing changed is removing the extra /

Hope it's OK I created the pull request directly as it's only a tiny change.

Best regards, Florian