L
L
latsenz2018-09-28 00:56:36
JavaScript
latsenz, 2018-09-28 00:56:36

Why does an Ajax request hang before reaching the server?

I send a request to the server using JQuery Ajax, but for some reason it does not reach the server (pm2 monit does not even show that there was an incoming request). After that, a timeout is triggered and the server shows that an incoming request has arrived at the server. I can not understand why this is happening, the rest of the requests work fine.
And one more thing: everything works on the localhost, not on the vps server, the nginx settings are the most basic and the same on the remote and local server.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Korobkov, 2018-09-28
@mkorobkov

Look at the browser console. (ctrl+shift+j in chrome or f12)
Also look at the Network tab in the browser's DevTools. Query in Network is displayed? If so, what is the server's response? Or the request is sent, but the answer does not come?
If there is no request in the Network, then most likely an error was made on the client, so you need to look at the console for errors.

L
latsenz, 2018-09-28
@latsenz

If you send a request to a remote server via Postman, then it will reach the server and be processed (you will receive a response about an invalid csrf signature, this is normal). It turns out the case is in the client, possibly in Jquery

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question