batman-ezio commented on a change in pull request #3839:
URL: https://github.com/apache/apisix/pull/3839#discussion_r597322804
##########
File path: apisix/plugins/cors.lua
##########
@@ -151,16 +176,8 @@ local function set_cors_headers(conf, ctx)
end
end
-
-function _M.rewrite(conf, ctx)
- if ctx.var.request_method == "OPTIONS" then
- return 200
- end
-end
-
-
-function _M.header_filter(conf, ctx)
- local allow_origins = conf.allow_origins
+local function process_with_allow_origins(conf, ctx)
+ local allow_origins = conf.allow_origins or {}
local req_origin = core.request.header(ctx, "Origin")
Review comment:
sure
--
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]