Merge branch 'pr-ab-subscription-form' of github.com:sharelatex/web-sharelatex into pr-ab-subscription-form

This commit is contained in:
Paulo Reis 2016-08-19 16:48:33 +01:00
commit 92bc411df5

View file

@ -2,6 +2,7 @@ request = require("request")
settings = require("settings-sharelatex") settings = require("settings-sharelatex")
_ = require("underscore") _ = require("underscore")
logger = require("logger-sharelatex") logger = require("logger-sharelatex")
URL = require("url")
currencyMappings = { currencyMappings = {
"GB":"GBP" "GB":"GBP"
@ -31,7 +32,7 @@ module.exports = GeoIpLookup =
return callback(e) return callback(e)
ip = ip.trim().split(" ")[0] ip = ip.trim().split(" ")[0]
opts = opts =
url: "#{settings.apis.geoIpLookup.url}/#{ip}" url: URL.resolve(settings.apis.geoIpLookup.url,ip)
timeout: 1000 timeout: 1000
json:true json:true
logger.log ip:ip, opts:opts, "getting geo ip details" logger.log ip:ip, opts:opts, "getting geo ip details"