Skip to content

Commit

Permalink
feat: make it support rewrite request body
Browse files Browse the repository at this point in the history
  • Loading branch information
rubikplanet committed Jul 19, 2023
1 parent 59c1d99 commit c981697
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apisix/plugins/ext-plugin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,12 @@ local rpc_handlers = {
end
end

local len = rewrite:BodyLength()
if len > 0 then
let body = rewrite:BodyAsString()
ngx.req.set_body_data(body)
end

local len = rewrite:RespHeadersLength()
if len > 0 then
local rewrite_resp_headers = {}
Expand Down

0 comments on commit c981697

Please sign in to comment.