diff --git a/internal/service/cmb_mock.go b/internal/service/cmb_mock.go index cb45686..7f25374 100644 --- a/internal/service/cmb_mock.go +++ b/internal/service/cmb_mock.go @@ -150,13 +150,13 @@ func (this *CmbService) queryOrder(r *http.Request) (*bo.OrderBo, error) { func (this *CmbService) queryByOrderNo(r *http.Request) (string, error) { - //ip := r.Header.Get("X-Forwarded-For") - //if len(ip) == 0 { - // ip = r.RemoteAddr - //} - //if ip != "117.175.169.61" && ip != "127.0.0.1" { - // return "", fmt.Errorf("ip check fail,IP:%s", ip) - //} + ip := r.Header.Get("X-Forwarded-For") + if len(ip) == 0 { + ip = r.RemoteAddr + } + if ip != "117.175.169.61" && ip != "127.0.0.1" { + return "", fmt.Errorf("ip check fail,IP:%s", ip) + } path := r.URL.Path parts := strings.Split(path, "/")