I had these proxy apps functioning properly last year, however with the following setup I keep getting Bad Request errors:
$.ajax({
type: 'POST',
url: 'https://my-shopify-domain.com/apps/member-area?handler=UpdateCollectorInfo',
headers: {
'X-Shopify-Access-Token': accessToken,
'Content-Type': 'application/json'
},
data: JSON.stringify(formData),
success: function (response) {
if (response.success) {
$('#UserFeedbackMessage').text(response.message).css('color', 'green').show();
} else {
$('#UserFeedbackMessage').text(response.message).css('color', 'red').show();
}
},
error: function (xhr, status, error) {
console.error("Error updating collector info:", error);
console.log("XHR:", xhr);
console.log("Status:", status);
console.log("Response Text:", xhr.responseText);
$('#UserFeedbackMessage').text("An error occurred while updating your profile.").css('color', 'red').show();
}
});
I have been trying to resolve this for weeks, and for some reason I have yet to find a solution in the forums, docs, or youtube.