title: reCaptcha issues : No 'Access-Control-Allow-Origin' header is present on the requested resource always shows even I have add header in angularJS
body: <p>i have some issues in google reCaptcha
  The captcha is fine, it's show normally, but when I submit it, I have connection issues when I send a POST request to </p>
  
  <p><a href="https://www.google.com/recaptcha/api/verify" rel="noreferrer">https://www.google.com/recaptcha/api/verify</a></p>
  
  <p>here the error log:</p>
  
  <pre><code>XMLHttpRequest cannot load https://www.google.com/recaptcha/api/verify. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3002' is therefore not allowed access. The response had HTTP status code 405.
  </code></pre>
  
  <p>here my html code:</p>
  
  <pre><code>&lt;div class="form-group" style="margin-bottom: 20px;"&gt;
      &lt;div class="text-center center-block"&gt;
        &lt;div class="text-center center-block" vc-recaptcha
        tabindex="3"
        theme="white"
        key="model.key"
        lang="en"
             &lt;/div&gt;
      &lt;button class="btn" ng-click="submit()"&gt;Submit&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And this is my controller.js</p>
  
  <pre><code> $scope.model = {
              key: //THIS IS MY PUBLIC KEY
          };
   $scope.submit = function() {
  
              var valid;
              var ip;
              $http.jsonp('http://ipinfo.io/?callback=JSON_CALLBACK')
                      .success(function(data) {
                          console.log("stateChangeStart ip = " + data.ip);
                          ip = data.ip;
                      }).then(function() {
                  $http({
                      method: 'POST',
                      headers: {
                          'Access-Control-Allow-Origin': '*',
                          'Access-Control-Allow-Methods': 'POST'
                      },
                      url: 'https://www.google.com/recaptcha/api/verify',
                      data: {
                          'privatekey': /* THIS IS MY PRIVATE KEY */,
                          'remoteip': ip,
                          'challenge': vcRecaptchaService.data().challenge,
                          'response': vcRecaptchaService.data().response
                      }
  
                  }).success(function(result, status) {
                      console.log('it work');
  
                  }).error(function(data, status, headers, config) {
                      console.log('error');
  
                  });
  
              });
          };
  </code></pre>
  
  <p>I have add headers there, but it always says</p>
  
  <blockquote>
    <p>No 'Access-Control-Allow-Origin' header is present on the requested
    resource</p>
  </blockquote>
  
  <p>can somebody help me?
  thank you</p>
  
  <h2><strong>Update:</strong></h2>
  
  <p>I am using chrome and I have enabled CORS in my Chrome with this addon :</p>
  
  <p><a href="https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi/related" rel="noreferrer">enabled CORS in chrome</a></p>
  
  <p>and now it give me another error:</p>
  
  <pre><code>XMLHttpRequest cannot load https://www.google.com/recaptcha/api/verify. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://localhost:3002' is therefore not allowed access. 
  </code></pre>
  
  <p>and i change my controller.js into this:</p>
  
  <pre><code> $scope.model = {
              key: //THIS IS MY PUBLIC KEY
          };
   $scope.submit = function() {
  
              var valid;
              var ip;
              $http.jsonp('http://ipinfo.io/?callback=JSON_CALLBACK')
                      .success(function(data) {
                          console.log("stateChangeStart ip = " + data.ip);
                          ip = data.ip;
                      }).then(function() {
                  $http({
                      method: 'POST',
                      headers: {
                          'Access-Control-Allow-Origin': 'http://localhost:3002',
                          'Access-Control-Allow-Methods': 'POST, GET, OPTIONS'
                      },
                      url: 'https://www.google.com/recaptcha/api/verify',
                      data: {
                          'privatekey': /* THIS IS MY PRIVATE KEY */,
                          'remoteip': ip,
                          'challenge': vcRecaptchaService.data().challenge,
                          'response': vcRecaptchaService.data().response
                      }
  
                  }).success(function(result, status) {
                      console.log('it work');
  
                  }).error(function(data, status, headers, config) {
                      console.log('error');
  
                  });
  
              });
          };
  </code></pre>
  
  <p>but that error is always shows, please help me.</p>