|
|
|
@ -13,6 +13,7 @@
|
|
|
|
|
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
|
|
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
|
|
|
* specific language governing permissions and limitations under the License.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package com.tencent.cloud.polaris.ratelimit.filter;
|
|
|
|
@ -76,8 +77,7 @@ public class QuotaCheckServletFilter extends OncePerRequestFilter {
|
|
|
|
|
localNamespace, localService, 1, labels, null);
|
|
|
|
|
if (quotaResponse.getCode() == QuotaResultCode.QuotaResultLimited) {
|
|
|
|
|
response.setStatus(TOO_MANY_REQUESTS.value());
|
|
|
|
|
response.getWriter().write(
|
|
|
|
|
RateLimitConstant.QUOTA_LIMITED_INFO + quotaResponse.getInfo());
|
|
|
|
|
response.getWriter().write(RateLimitConstant.QUOTA_LIMITED_INFO);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
filterChain.doFilter(request, response);
|
|
|
|
|