I have a following script on my aspx page that i am trying to do a post method to pass data to a url as follows:
<script>
$.ajax({
type:"POST",
url: "https://www.google.com/recaptcha/api/siteverify",
crossDomain: true,
data: {"secret" : "0000000", "response" : response, "remoteip":"localhost"},
contentType: "application/json; charset=utf-8",
success: function (data) {
console.log(data + "test");
}
});
</script>
when it hits the URL mentioned above i get the following error Access to XMLHttpRequest at 'https://www.google.com/recaptcha/api/siteverify' from origin 'http://localhost' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
how do i get this to work?