hyt05 opened a new issue, #1376: URL: https://github.com/apache/apisix-ingress-controller/issues/1376
### Issue description In the example you can register a route using vars to match http requests ``` curl -i http://127.0.0.1:9180/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "uri": "/hello", "host": "foo.com", "vars": [ [ "scheme", "==", "http" ] ], "plugins": { "redirect": { "uri": "https://$host$request_uri", "ret_code": 301 } } }' ``` The scope in ApisixRoute does not seem to support customization, only Header, Query and CookiePath are supported ``` apiVersion: apisix.apache.org/v2beta3 kind: ApisixRoute metadata: annotations: meta.helm.sh/release-name: erp-yhcbs-ui meta.helm.sh/release-namespace: erp creationTimestamp: "2022-10-10T03:34:34Z" generation: 5 labels: app.kubernetes.io/managed-by: Helm name: erp-yhcbs-ui namespace: erp resourceVersion: "515415515" uid: 8c6bf8dc-8a2c-4528-833c-b3ff68b1475a spec: http: - backends: - serviceName: erp-yhcbs-ui servicePort: 80 match: exprs: - op: Equal subject: name: env scope: Query value: http hosts: - test.test.cn paths: - /* name: erp-yhcbs-ui plugins: - config: ret_code: 301 uri: https://$host$request_uri enable: true name: redirect ``` ### Environment - your apisix-ingress-controller version (output of apisix-ingress-controller version --long): apisix-ingress-controller:1.4.1 - your Kubernetes cluster version (output of kubectl version): v1.24.2+rke2r1 - if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a): 5.15.0-39-generic #42-Ubuntu -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
