php - ajax custom header submits twice
Get the solution ↓↓↓Solution:
I'm not sure why I finally sat down and tested the difference between the two in jsfiddle. The custom header addition does add in the OPTIONS preflight. I am not sure why it is double calling besides that. The only other possible outcome is a cached version getting called and then after forcing a refresh of the material that can happen if you have a inappropriately configured version of memcache or some other cacheing plugin on your webserver.
Examples of the issue with header
Example of the issue without header
As you can see from the developer tools with the added header it does the preflight options request and without it it receives just the 404.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: illuminate\http\exceptions\posttoolargeexception
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.