tokers commented on a change in pull request #4194:
URL: https://github.com/apache/apisix/pull/4194#discussion_r628105724



##########
File path: t/plugin/response-rewrite.t
##########
@@ -676,3 +676,55 @@ GET /t
 invalid base64 content
 --- no_error_log
 [error]
+
+
+
+=== TEST 24: rewrite header with variable

Review comment:
       ```suggestion
   === TEST 24: rewrite header with variables
   ```

##########
File path: docs/en/latest/plugins/response-rewrite.md
##########
@@ -46,7 +46,7 @@ response rewrite plugin, rewrite the content returned by the 
upstream as well as
 | status_code | integer | optional    |         | [200, 598] | New `status 
code` to client, keep the original response code by default.                    
                                                                                
                                                  |
 | body        | string  | optional    |         |            | New `body` to 
client, and the content-length will be reset too.                               
                                                                                
                                                |
 | body_base64 | boolean | optional    | false   |            | Identify if 
`body` in configuration need base64 decoded before rewrite to client.           
                                                                                
                                                  |
-| headers     | object  | optional    |         |            | Set the new 
`headers` for client, can set up multiple. If it exists already from upstream, 
will rewrite the header, otherwise will add the header. You can set the 
corresponding value to an empty string to remove a header. |
+| headers     | object  | optional    |         |            | Set the new 
`headers` for client, can set up multiple. If it exists already from upstream, 
will rewrite the header, otherwise will add the header. You can set the 
corresponding value to an empty string to remove a header. The value can 
contain Nginx variable in `$var` format, like `$remote_addr $balancer_ip` |

Review comment:
       ```suggestion
   | headers     | object  | optional    |         |            | Set the new 
`headers` for client, can set up multiple. If it exists already from upstream, 
will rewrite the header, otherwise will add the header. You can set the 
corresponding value to an empty string to remove a header. The value can 
contain Nginx variables in `$var` format, like `$remote_addr $balancer_ip` |
   ```




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


Reply via email to