Uncovered that in the .test environment we are unable to authenticate as sending from a secured webpage/form. When we moved this to a secure site the form POSTs correctly.
Oct 1, 2024
1
Level 6
FormSpark Failing with SSL Error
I have a simple form on page for support requests that POSTS to Formspark. It is failing with :
[Error] An SSL error has occurred and a secure connection to the server cannot be made.
[Error] XMLHttpRequest cannot load https://submit-form.com/xxxxxxxx due to access control checks. in both Chrome and Safari.
I can use POSTMAN and submit a form successfully.
I can successfully curl a form from the servers that are getting the issue.
Any insights are greatly appreciated !!! My code is as follows:
let data = {
name: name.value,
email: email.value,
message: message.value
};
// Stringify the data into JSON format
data = JSON.stringify(data);
console.log("Data: ", data);
axios
.post('https://submit-form.com/xxxxxxxx', data, {
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
})
.then(() => {
sent.value = true
resetForm()
startAutoCloseTimer()
console.log("After Split: ", currentDate.toString());
})
.catch(() => {
//console.error('Error details:', error); // Make sure to capture the error object
loading.value = false;
alert('There was a problem sending your message.');
})
.finally(() => {
loading.value = false;
});
console.log("last Split: ", currentDate.toString());
Please or to participate in this conversation.