我在尝试提交表单时收到此错误。
否'访问控制 - 允许 - 来源'标头出现在请求的资源上。起源' http://example.com'因此不允许访问。
我的代码是,
var varificationUrl = 'https://www.google.com/recaptcha/api/siteverify?secret='+$scope.model.key+'&response='+$scope.response;
$http({
method: 'GET',
url: varificationUrl,
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
}).then(function successCallback(response) {
// this callback will be called asynchronously
// when the response is available
console.log(response)
}, function errorCallback(response) {
console.log(response)
// called asynchronously if an error occurs
// or server returns response with an error status.
});