Gary-Airwallex commented on a change in pull request #6546:
URL: https://github.com/apache/apisix/pull/6546#discussion_r823365079



##########
File path: apisix/plugins/cors.lua
##########
@@ -177,13 +208,19 @@ 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
     if allow_origins == "**" then
         allow_origins = req_origin or '*'
     end
-    local multiple_origin, err = core.lrucache.plugin_ctx(lrucache, ctx, nil,
-                                                create_multiple_origin_cache, 
conf)
+
+    if not (cache_key and cache_version) then
+        cache_key, cache_version = core.lrucache.plugin_ctx_id(ctx)

Review comment:
       😂fixed




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