miaoyb commented on issue #3778:
URL: https://github.com/apache/apisix/issues/3778#issuecomment-792594658


   > ### Issue description
   > 跨域插件bug,开启全局跨域之后再关闭全局跨域插件,跨域依然生效
   > 
   > ### Environment
   > * apisix version (cmd: `apisix version`): v2.3
   > * OS (cmd: `uname -a`):
   > * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   > * etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   > * apisix-dashboard version, if have:
   > 
   > ### Minimal test code / Steps to reproduce the issue
   > 1. 开启全局跨域
   >    2.前后端分离项目可以正常从前端跨域访问后端
   >    3.关闭全局跨域,前端依然可以跨域访问后端。即使清空etcd再次建立新的route,依然可以成功
   > 
   > etcd info
   > 
   > ```json
   > 
[{"name":"api-breaker"},{"name":"authz-keycloak"},{"name":"basic-auth"},{"name":"batch-requests"},{"name":"consumer-restriction"},{"name":"cors"},{"name":"echo"},{"name":"fault-injection"},{"name":"grpc-transcode"},{"name":"hmac-auth"},{"name":"http-logger"},{"name":"ip-restriction"},{"name":"jwt-auth"},{"name":"kafka-logger"},{"name":"key-auth"},{"name":"limit-conn"},{"name":"limit-count"},{"name":"limit-req"},{"name":"openid-connect"},{"name":"prometheus"},{"name":"proxy-cache"},{"name":"proxy-mirror"},{"name":"proxy-rewrite"},{"name":"redirect"},{"name":"referer-restriction"},{"name":"request-id"},{"name":"request-validation"},{"name":"response-rewrite"},{"name":"serverless-post-function"},{"name":"serverless-pre-function"},{"name":"sls-logger"},{"name":"syslog"},{"name":"tcp-logger"},{"name":"udp-logger"},{"name":"uri-blocker"},{"name":"wolf-rbac"},{"name":"zipkin"},{"name":"server-info"},{"name":"traffic-split"},{"stream":true,"name":"mqtt-proxy"}]
   > ```
   > 
   > ```json
   > 
{"create_time":1615188897,"status":1,"upstream_id":"abc-test","update_time":1615188897,"priority":0,"name":"abc-test","methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],"uris":["\/*"],"vars":{},"plugins":{"redirect":{"ret_code":302,"http_to_https":true}},"hosts":["abc-test.test.cn"]}
   > ```
   > 
   > ### What's the actual result? (including assertion message & call stack if 
applicable)
   > ### What's the expected result?
   
   
   
   > You should provide reproducible use cases or related etcd configuration 
information.
   
   The etcd configuration has been added.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to