Answer the question
In order to leave comments, you need to log in
Why does nginx do a 301 redirect?
Hello, there is such an incomprehensible problem. When I send a backend request with curl like:
curl -X POST -i -H "Content-Type: application/json" -d '{"phone_number":"+.....","password":" 1qaz1qaz"}' server_name/users
Then nginx does a redirect 301 and nothing else. (And the request must create a user and return code 201)
And when the request is like:
curl -X POST -i -H "Content-Type: application/json" -d '{"phone_number":"+....... ","password":"1qaz1qaz"}' server_name/login
Then everything works as it should.
What is the problem?
Answer the question
In order to leave comments, you need to log in
Well, the backend is likely to redirect.
Here and there without nginx configs and code from the /users route, they will not help you in any way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question