mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-28 19:41:33 +02:00
Merge pull request #25355 from overleaf/mf-whitelist-staging-url-stripe-test
[web] Bypass country requirement for Stripe if user is on staging or dev environment to ease the testing process GitOrigin-RevId: 0924a57d3a1b7b530a3822fb8f9056a1dd7119e9
This commit is contained in:
@@ -704,7 +704,7 @@ async function getRecommendedCurrency(req, res) {
|
||||
ip = req.query.ip
|
||||
}
|
||||
const currencyLookup = await GeoIpLookup.promises.getCurrencyCode(ip)
|
||||
let countryCode = currencyLookup.countryCode
|
||||
const countryCode = currencyLookup.countryCode
|
||||
const recommendedCurrency = currencyLookup.currencyCode
|
||||
|
||||
let currency = null
|
||||
@@ -715,13 +715,6 @@ async function getRecommendedCurrency(req, res) {
|
||||
currency = recommendedCurrency
|
||||
}
|
||||
|
||||
const queryCountryCode = req.query.countryCode?.toUpperCase()
|
||||
|
||||
// only enable countryCode testing flag on staging or dev environments
|
||||
if (queryCountryCode && process.env.NODE_ENV !== 'production') {
|
||||
countryCode = queryCountryCode
|
||||
}
|
||||
|
||||
return {
|
||||
currency,
|
||||
recommendedCurrency,
|
||||
|
||||
Reference in New Issue
Block a user