G
G
gooseNjuice()2022-03-10 16:28:46
Nginx
gooseNjuice(), 2022-03-10 16:28:46

Why is there no proxy?

There is a request to a third-party API, let it be https://ws75.aptoide.com/api/7/apps/search?query=asd
There is an nginx.conf config with the lines:

location /api/7/apps/search {
   proxy_pass https://ws75.aptoide.com/;
}
(of course the location is inside the server, which is inside the http)
I have a React app with a form that sends the following request:
fetch('/api/7/apps/search?' + new URLSearchParams({
                query: input.value
            }))

Why is the request https://ws75.aptoide.com/api/7/apps/search?query=asd not being sent ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2022-03-10
@gooseNjuice

Read about the terminating slash in the directive proxy_pass, figure out what it does.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question