Revolyssup commented on code in PR #9710:
URL: https://github.com/apache/apisix/pull/9710#discussion_r1266362550
##########
apisix/plugins/opa.lua:
##########
@@ -125,6 +134,18 @@ function _M.access(conf, ctx)
end
return status_code, reason
+ else if result.headers and conf.send_headers_upstream then
+ local headersToSend = {}
+ for key in pairs(conf.send_headers_upstream) do
+ headersToSend[key] = true
+ end
+ for key,value in pairs(result.headers) do
+ if headersToSend[key] then
+ core.request.set_header(ctx,key,value)
Review Comment:
Makes much sense. Done
##########
apisix/plugins/opa.lua:
##########
@@ -125,6 +134,18 @@ function _M.access(conf, ctx)
end
return status_code, reason
+ else if result.headers and conf.send_headers_upstream then
+ local headersToSend = {}
+ for key in pairs(conf.send_headers_upstream) do
+ headersToSend[key] = true
+ end
+ for key,value in pairs(result.headers) do
+ if headersToSend[key] then
+ core.request.set_header(ctx,key,value)
Review Comment:
Makes more sense. Done
--
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]