'Why is not proxing?
There is a request to a third-party API, let it be https://ws75.aptoid.com/api/7/apps/search?query=asd
There is a nginx.conf config with rows:
location /api/7/apps/search {
proxy_pass https://ws75.aptoide.com/;
}
(of course, Location lies inside the Server, which lies inside HTTP)
There is a React application with a form, when sending which the following query occurs:
fetch('/api/7/apps/search?' + new URLSearchParams({
query: input.value
}))
Why does not send a request to https://ws75.aptoid.com/api/7/apps/search?query=asd?
Solution 1:[1]
Ok so, do simply from the root url location :
location / {
proxy_pass https://ws75.aptoide.com/;
}
? URI will be add to proxy_pass automatically.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
