-
Enhancement
-
Resolution: Done
-
Trivial
-
None
-
2.13.1 GA
-
2
-
False
-
None
-
False
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
-
-
API CCS Sprint 44 (3Scale) 2
4.1.14. HTTP Status Code Overwrite
The section explains that
For example, you could use the HTTP Status Code Overwrite policy to change upstream 201, "Created", response codes, to 200, "OK", response codes.
Another example of a response code that you might want to change is the response when a content limit is exceeded. The upstream might return 413, payload too large, when a response code of 414, request-URI too long, would be more helpful.
and the example json is:
{ "name": "statuscode_overwrite", "version": "builtin", "configuration": { "http_statuses": [ { "upstream": 200, "apicast": 201 }, { "upstream": 413, "apicast": 414 } ] } }
The first example is confusing because the status code in the json is reversed from the above explanation.
So please flip the status codes like this:
{ "name": "statuscode_overwrite", "version": "builtin", "configuration": { "http_statuses": [ { "upstream": 201, "apicast": 200 }, { "upstream": 413, "apicast": 414 } ] } }