|
@@ -274,12 +274,12 @@ def confirm_region_with_ip(request):
|
|
region = ip_qs.region
|
|
region = ip_qs.region
|
|
country_code = ip_qs.country_id
|
|
country_code = ip_qs.country_id
|
|
|
|
|
|
- area = 'mainland'
|
|
|
|
|
|
+ # 海外返回200状态码,国内403
|
|
if country_code != 'CN':
|
|
if country_code != 'CN':
|
|
- return HttpResponse(status=110)
|
|
|
|
|
|
+ return HttpResponse()
|
|
elif region in ['香港', '澳门', '台湾']:
|
|
elif region in ['香港', '澳门', '台湾']:
|
|
- return HttpResponse(status=110)
|
|
|
|
- return HttpResponse(status=111)
|
|
|
|
|
|
+ return HttpResponse()
|
|
|
|
+ return HttpResponse(status=403)
|
|
except Exception as e:
|
|
except Exception as e:
|
|
return HttpResponse(status=500,
|
|
return HttpResponse(status=500,
|
|
content='error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
content='error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|