You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/17 16:31:50 UTC

[GitHub] [apisix] Miss-you commented on a change in pull request #2732: docs: add Attention message for 'response-rewrite' doc.

Miss-you commented on a change in pull request #2732:
URL: https://github.com/apache/apisix/pull/2732#discussion_r525302947



##########
File path: doc/plugins/response-rewrite.md
##########
@@ -116,3 +117,11 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f1
 ```
 
 The `response rewrite` plugin has been disabled now. It works for other plugins.
+
+## Attention
+
+`ngx.exit` will interrupt the execution of the current request and return status code to Nginx.
+
+![](https://cdn.jsdelivr.net/gh/Miss-you/img/picgo/20201113010623.png)
+
+However, if you execute `ngx.exit` during the access phase, it only interrupts the request processing phase, and the response phase will still process it, i.e. if you configure the `response-rerite` plugin, it will force overwriting of your response information (e.g. response code).

Review comment:
       done
   
   
   > Please check the plugin name
   
   




----------------------------------------------------------------
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:
users@infra.apache.org