S
S
skise2017-11-11 02:11:06
Nginx
skise, 2017-11-11 02:11:06

How to proxy with the limit_req directive through the stream nginx module (official guide), i.e. TCP Proxy?

You need to limit requests for VK. VK requests via https. Requests go from the server to nginh,

server {
listen 8044;
ssl on;
ssl_certificate /etc/ssl/certs/myssl.crt;
ssl_certificate_key /etc/ssl/private/myssl.key;

location /route/{
limit_req zone=mylimit burst=5000;
proxy_pass https://api.vk.com/;
}
location /pu/{
limit_req zone=mylimit burst=5000;
proxy_pass https://pu.vk.com/;
}

}

how can all this be done without generating ssl ? In addition, in a node (node, node.js) to send such a request, you have to enter before the request ` process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
`
I don’t know how to say it correctly - probably it will be proxying https requests?
All this is needed to limit requests per second (no more than 3 requests per second)
, so how to do it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question