1

I am proxying some paths to another server. That server responds with 302 Moved Temporarily. I need to change that particular status code to 200 OK. Otherwise I can pass response through as-is and other status codes should pass without changes.

location /api { proxy_pass http://some.server/api; } 

Reason for status code mangling is IE that wont work with 302 status code in this request when using Ajax.

3
  • But 200 should give some result content, I guess. How should nginx get it? Commented Jan 29, 2015 at 12:42
  • 200 with empty content or fixed content (specified in nginx configuration) or 204 No Content are also suitable responses in my case. Commented Jan 29, 2015 at 18:21
  • Well, then you need error_page and proxy_intercept_errors Commented Jan 29, 2015 at 18:29

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.