You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apisix.apache.org by xxm404 <xi...@163.com> on 2020/06/03 10:36:34 UTC
Rate-limit support custom error response content
The limit-count, limit-conn, limit-req plugin should support error response content.
Re: Rate-limit support custom error response content
Posted by xxm404 <xi...@163.com>.
At now when trigger conn/req/count limit APISIX response like this
HTTP/1.1 503 Service Temporarily Unavailable
Date: Wed, 03 Jun 2020 12:13:32 GMT
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Connection: keep-alive
Keep-Alive: timeout=55
Server: APISIX web server
{}
We can add option parameters for limit-xxx( limit-req/limit-conn/limit-count) plugin make the response like this
HTTP/1.1 503 Service Temporarily Unavailable
Date: Wed, 03 Jun 2020 12:13:32 GMT
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Connection: keep-alive
Keep-Alive: timeout=55
Server: APISIX web server
{ “message”: “custom error response message"}
> 在 2020年6月3日,下午6:40,Ming Wen <we...@apache.org> 写道:
>
> hi,xxm404,
> can you show one example? thx
>
> xxm404 <xi...@163.com> 于 2020年6月3日周三 下午6:36写道:
>
>> The limit-count, limit-conn, limit-req plugin should support error
>> response content.
>>
Re: Rate-limit support custom error response content
Posted by Ming Wen <we...@apache.org>.
hi,xxm404,
can you show one example? thx
xxm404 <xi...@163.com> 于 2020年6月3日周三 下午6:36写道:
> The limit-count, limit-conn, limit-req plugin should support error
> response content.
>