apisix icon indicating copy to clipboard operation
apisix copied to clipboard

bug: apisix not allow request, when user-agent set to "Go-http-client/2.0"

Open wuyue92tree opened this issue 1 year ago • 3 comments

Current Behavior

when set a request with User-Agent: Go-http-client/2.0, return 500 image

Expected Behavior

return the real data

Error Logs

No response

Steps to Reproduce

  1. start a web service behand apisix
  2. curl https://webservice -H "User-Agent: Go-http-client/2.0"

Environment

  • APISIX version (run apisix version): 3.9.1

wuyue92tree avatar Oct 07 '24 17:10 wuyue92tree

What about the route/plugin config?

zhoujiexiong avatar Oct 08 '24 02:10 zhoujiexiong

What about the route/plugin config?

My apisix is with k8s

only enable chaitin-waf & redirect plugin in globalrule

---
apiVersion: apisix.apache.org/v2
kind: ApisixGlobalRule
metadata:
  name: antio-top-global-rule
spec:
  plugins:
    - name: chaitin-waf
      enable: true
    - name: redirect
      enable: true
      config:
        http_to_https: true

---
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
  name: antio-top-route
  namespace: default
spec:
  http:
  - name: one-api
    match:
      hosts:
      - oneapi.antio.top
      paths:
      - /*
    backends:
       - serviceName: one-api
         servicePort: 3000

---
apiVersion: apisix.apache.org/v2
kind: ApisixTls
metadata:
  name: antio-top-tls
spec:
  hosts:
  - antio.top
  - '*.antio.top'
  secret:
    name: antio-top-tls
    namespace: default

wuyue92tree avatar Oct 08 '24 14:10 wuyue92tree

In safeline this request is allowed

image

but when I disable chaitin-waf plugin,return real data. It's look like this issue caused by chaitin-waf plugin

safeline version: 6.10.5

wuyue92tree avatar Oct 08 '24 14:10 wuyue92tree