We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Frontend: Vue, API: Phalcon, Issue: Vue sends two requests each time, one passes, one fails on 404 and says "Controller not Foun

So I'm trying to set up this API and Vue frontend on my Debian Stretch localhost. My PHP log looks something like this:

I can't share any of the code sadly, because I've signed an NDA, but for the reference, here are some charactrictics of the code:

1- It uses JWT to authenticate.

2- It has an APIController which checks for Application-Token in the headers. If there's no such thing, it will reject the request. But it doesn't seem to be the case here because I'm getting 404.

3- If I open the routes via the browser or Postman, I get the "XController Not Found" error.

I'm happy to answer any more of your questions. Please help me. Thank you.

Do you have developer tools open by any chance? They sometimes send a duplicate request.