title: XMLHttpRequest Issue has been blocked by CORS policy:
body: <p>I have this code in codepen and it works properly however if I installed this code on a wordpress site as a plugin, it says this error below.</p>
  <p>Access to XMLHttpRequest at 'https://vative.us15.list-manage.com/subscribe/post' (redirected from 'http://vative.us15.list-manage.com/subscribe/post') from origin 'http://localhost:8888' 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.</p>
  <p>My codepen is here.</p>
  <p><a href="https://codepen.io/gegejosper/pen/powzGQJ?editors=1011" rel="nofollow noreferrer">https://codepen.io/gegejosper/pen/powzGQJ?editors=1011</a></p>
  <pre><code>$.ajax({
              type: &quot;post&quot;,
              url: &quot;https://vative.us15.list-manage.com/subscribe/post&quot;,
            
              dataType: &quot;json&quot;,
            data: data_val,
          
              success: function(data) {
                  $(&quot;.optin-form&quot;).hide();
                  $(&quot;.optin-success&quot;).show();
              },
              //expected to be error in result.
              error: function(data){
                
                $(&quot;.optin-form&quot;).hide();
                $(&quot;.optin-success&quot;).show();
              }
          });
  </code></pre>
  <p>Is there a way to fix this issue? Please help.</p>