Angular JS with CORS has an OPTIONS request waiting forever

I worked with angular for a while, and now, when I am deploying two relatively large projects, you are faced with some strange problem. Sometimes an OPTIONS request gets stuck waiting forever, blocking the flow of code until the next procedure. This happens randomly, I log in, run here and there, and then suddenly a problem appears.

This is a chrome string with a pending request.

Stuck options

Thank you for your cooperation.

- Additional Information -

I use Silex on the backend. This call in the screenshot sometimes works, sometimes it’s not, this is true for all URLs, they accidentally get stuck ..

+4
source share
1 answer

Your answer OPTIONS should be 204 (not 200). Also make sure that there is no content in the response text.

+1
source

All Articles