Drewolf opened a new issue, #8399:
URL: https://github.com/apache/apisix/issues/8399

   ### Description
   
   **背景:**
       我通过apisix-dashboard创建了一条路由,后端配置的是k8s集群中的SVC,目前想在 apisix-dashboard 
上通过全局跨域插件,配置接口允许部分 origin 跨域访问。
   
   **问题:**
       使用插件默认配置,allow_origins 配置为 * 
,可正常允许跨域。但是想通过配置allow_origins_by_regex,使用正则表达式数组来匹配允许跨域访问的 Origin,则跨域配置不生效。
   
    **具体配置细节:**
    allow_origins 配置为 * ,可正常允许跨域
   
![image](https://user-images.githubusercontent.com/30138193/203886113-1fff97b4-faef-4265-8425-3cbd1fd3ef21.png)
   
   
![image](https://user-images.githubusercontent.com/30138193/203887127-33d1fb6f-419a-41ed-b1a4-9e2cff8ce13d.png)
   
   配置allow_origins_by_regex,使用正则表达式数组来匹配允许跨域访问的 Origin,则跨域配置不生效
   
![image](https://user-images.githubusercontent.com/30138193/203887311-935c0e00-21b6-4f7f-9778-72c31525c088.png)
   
   
![image](https://user-images.githubusercontent.com/30138193/203887568-6ec6037b-3511-40eb-9dca-658e90b6dacd.png)
   
   
   ### Environment
   
   - APISIX version (run `apisix version`):
   2.15.0-alpine
   - Operating system (run `uname -a`):
   helm 部署
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):
   3.5.4-debian-11-r14
   - APISIX Dashboard version, if relevant:
   2.13-alpine
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


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

Reply via email to