# Capture 2xx response from proxy and rewrite

**URL:** <https://www.ruby-forum.com/t/capture-2xx-response-from-proxy-and-rewrite/236869>\
**Category:** NGINX\
**Created:** [October 8, 2013, 5:55pm UTC](https://www.ruby-forum.com/t/capture-2xx-response-from-proxy-and-rewrite/236869 "2013-10-08T17:55:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alcina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@alcina](https://www.ruby-forum.com/u/alcina)\
**Post date:** [October 8, 2013, 5:55pm UTC](https://www.ruby-forum.com/t/capture-2xx-response-from-proxy-and-rewrite/236869/1 "2013-10-08T17:55:12Z")

</div>

Hi,

Is it possible to catch a 2xx response from a upstream proxy and rewrite  
the  
response? We’re able to do this with 4xx and 5xx responses using  
proxy\_intercept\_errors and error\_page, but I haven’t found an equivalent  
way  
of doing this for 2xx responses.

Posted at Nginx Forum:

> **[Capture 2xx response from proxy and rewrite](https://forum.nginx.org/read.php?2,243530,243530#msg-243530)**
>
> Hi, Is it possible to catch a 2xx response from a upstream proxy and rewrite the response? We're able to do this with 4xx and 5xx responses using proxy\_intercept\_errors and error\_page, but I haven't found an equivalent way of doing this for 2xx...
