You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/03/11 02:56:50 UTC

[GitHub] [apisix] tzssangglass commented on a change in pull request #6546: feat: set cors allow origins by plugin metadata

tzssangglass commented on a change in pull request #6546:
URL: https://github.com/apache/apisix/pull/6546#discussion_r824347677



##########
File path: apisix/plugins/cors.lua
##########
@@ -177,13 +208,24 @@ local function set_cors_headers(conf, ctx)
     end
 end
 
-local function process_with_allow_origins(conf, ctx, req_origin)
-    local allow_origins = conf.allow_origins
+local function process_with_allow_origins(allow_origins_conf, ctx, req_origin,
+                                          cache_key, cache_version)
+    local allow_origins = allow_origins_conf

Review comment:
       We don't need to declare `allow_origins_conf` as `local allow_origins` here, just change the `allow_origins_conf` -> `allow_origins` in parameter list is ok?




-- 
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: notifications-unsubscribe@apisix.apache.org

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