D
D
DarkUser13372020-07-07 20:23:55
PHP
DarkUser1337, 2020-07-07 20:23:55

Request limit in REST API?

Hello! There was a need to limit requests, for example 40 requests per minute from one IP. I looked in the direction of Nginx rate limiting, but did not understand how to use it in the REST API and return a JSON response with an error. Also looked at PHP + Redis but not sure about its effectiveness

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanes, 2020-07-07
@Sanes

Get familiar with NGINX. This is the easiest way. In PHP, they usually do it if you need to restrict by user or by a specific URI.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question