'React Axios Post Requests Being Blocked After Initially Succeeding
I have a React app that has a contact form that submits data to a third party such as Formspark.io, Formspree.io, or FormSubmit.co who basically collect the form submission data, and then notify you via email.
Locally, I have been able to submit my test form data to all three services. With Formspark.io, I was able to send about 8-10 submissions, before they began to be blocked. With the other two--Formspree.io and FormSubmit.co, only the first or initial submission was accepted. Subsequent submissions were blocked as well.
So, given that I was able to get at least one form submission through to all three, and then all three began to block submissions, leads me to believe that it's not the third parties. It is likely something that needs to be added to my code. I have some idea what that might be. Thus the question.
Here is the error in the console I am receiving:
Failed to load resource: net::ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep
index.js (relevant form code)
const formId = "abc1234";
const formSparkUrl = `https://submit-form.com/${formId}`;
try {
const result = await axios
.post(formSparkUrl, payload)
.then(function (response) {
console.log(response);
});
...
Any ideas about why submissions are going through successfully only once? Then blocked subsequent times?
Any ideas how to solve this?
Please let me know if you need to see anything else.
Thanks,
Ironman
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|