Made chinaVersion detection fire only when the language is Chinese.
This commit is contained in:
parent
5502deb9f6
commit
62e8ee624c
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ setupChinaRedirectMiddleware = (app) ->
|
||||||
geo = geoip.lookup(ip)
|
geo = geoip.lookup(ip)
|
||||||
return geo?.country is "CN" and speaksChinese
|
return geo?.country is "CN" and speaksChinese
|
||||||
else
|
else
|
||||||
req.chinaVersion = true
|
req.chinaVersion = true if speaksChinese
|
||||||
return false # If the user is already redirected, don't redirect them!
|
return false # If the user is already redirected, don't redirect them!
|
||||||
|
|
||||||
app.use (req, res, next) ->
|
app.use (req, res, next) ->
|
||||||
|
|
Reference in a new issue