mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
use url.resolve to build url for freegeoip lookups
This commit is contained in:
parent
c653f59705
commit
50b3403983
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ request = require("request")
|
|||
settings = require("settings-sharelatex")
|
||||
_ = require("underscore")
|
||||
logger = require("logger-sharelatex")
|
||||
URL = require("url")
|
||||
|
||||
currencyMappings = {
|
||||
"GB":"GBP"
|
||||
|
@ -31,7 +32,7 @@ module.exports = GeoIpLookup =
|
|||
return callback(e)
|
||||
ip = ip.trim().split(" ")[0]
|
||||
opts =
|
||||
url: "#{settings.apis.geoIpLookup.url}/#{ip}"
|
||||
url: URL.resolve(settings.apis.geoIpLookup.url,ip)
|
||||
timeout: 1000
|
||||
json:true
|
||||
logger.log ip:ip, opts:opts, "getting geo ip details"
|
||||
|
|
Loading…
Reference in a new issue