Answer the question
In order to leave comments, you need to log in
How to proxy API requests to the backend server through NGINX?
Good afternoon!
There is NGINX which proxies requests to the internal backend server.
Recently there was a task to transfer data via the Yandex API to this server on a specific port.
Honestly, I have never come across this, tell me how to implement it?
Answer the question
In order to leave comments, you need to log in
so be it
location /yaapi/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://api.yandex.ru/api;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question