title: How to fix CORS issue between webflow and netlify
body: <p>I have deployed my first netlify site that simply returns a few records from airtable:</p>
  <p><a href="https://codefy-airtable.netlify.app/.netlify/functions/courses" rel="nofollow noreferrer">https://codefy-airtable.netlify.app/.netlify/functions/courses</a></p>
  <p>it also works with a redirect I set up:-</p>
  <p><a href="https://codefy-airtable.netlify.app/api/courses" rel="nofollow noreferrer">https://codefy-airtable.netlify.app/api/courses</a></p>
  <p>However, when I add an axios get function to my header script in webflow to test it I get a CORS error:-</p>
  <blockquote>
  <p>“Access to XMLHttpRequest at
  ‘https://codefy-airtable.netlify.app/.netlify/functions/courses’
  from origin ‘https://mgl-community.webflow.io’ has been blocked by
  CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the
  requested resource.”</p>
  </blockquote>
  <p><a href="https://mgl-community.webflow.io" rel="nofollow noreferrer">mgl-community.webflow.io</a></p>
  <p>Make Give Live | Community
  This is my function:-</p>
  <pre><code>   axios.get('https://codefy-airtable.netlify.app/.netlify/functions/courses')
    .then(function (response) {
      console.log('axios ', response);
    })
    .catch(function (error) {
      console.log('Axios ', error);
    });
  </code></pre>
  <p>This is my github repo <a href="https://github.com/jonathanlyon/airtable-temp" rel="nofollow noreferrer">https://github.com/jonathanlyon/airtable-temp</a> that shows the _header file with:-</p>
  <pre><code>/*
  Access-Control-Allow-Origin: *
  </code></pre>
  <p>and the .toml file with:</p>
  <pre><code>[[headers]]
  for = &quot;/*&quot;
  [headers.values]
  Access-Control-Allow-Origin = &quot;*&quot; 
  </code></pre>
  <p><a href="https://i.stack.imgur.com/tF5DW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tF5DW.png" alt="deploy results" /></a></p>
  <p>Any idea why I can’t use the json data returned from the URL please?</p>
  <p>Thanks</p>
  <p>Jonathan</p>