batman-ezio commented on a change in pull request #3839:
URL: https://github.com/apache/apisix/pull/3839#discussion_r594850237



##########
File path: apisix/plugins/cors.lua
##########
@@ -151,6 +152,17 @@ local function set_cors_headers(conf, ctx)
     end
 end
 
+local function get_match_domain(allow_origins, req_origin)
+    if allow_origins == req_origin or allow_origins == '*' then
+        return req_origin
+    else
+        local matched = re_find(req_origin, allow_origins, "jo")

Review comment:
       ok , but when user set  `add allow_origins_by_regex` and `allow_origins` 
at the same time, how can we deal with that. they may have conflicts




----------------------------------------------------------------
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:
[email protected]


Reply via email to