Answer the question
In order to leave comments, you need to log in
How to limit process requests to third-party services using nginx if service requests must be via https?
There is a node.js process that makes requests to services, services have a limit of requests per second,
`
limit_req_zone $arg_userident zone=mylimit:10m rate=10r/s;
server {
listen 9333;
ssl_certificate /etc/nginx/cert.crt;
ssl_certificate_key /etc/nginx/cert.key;
ssl on;
location /route/{
limit_req zone=mylimit burst=2000;
proxy_pass https://limit_service.com/;
}
}
ERROR >>> { Error: self signed certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1046:34)
at TLSSocket.emit (events.js:180:13)
at TLSSocket._finishInit (_tls_wrap.js:633:8) code : 'DEPTH_ZERO_SELF_SIGNED_CERT', response: undefined }
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
Answer the question
In order to leave comments, you need to log in
Look at the nginx manual: https://docs.nginx.com/nginx/admin-guide/security-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question