title: Axios: Uncaught (in promise) TypeError: Cannot read property 'protocol' of undefined
body: <p>I am getting the title error after running the following function in React:</p>
  
  <pre><code>  const postToApi = (event) =&gt; {
      event.preventDefault();
      axios.post(process.env.API_POST_URL, {step : "3"}) 
        // API_POST_URL: http://localhost:4000/api/donate
        .then(res =&gt; {
          console.log(res);
          console.log(res.data);
        })
    };
  </code></pre>
  
  <p>My React app is on localhost:3000. Mentioning this because the file causing the error is: isURLSameOrigin.js:51</p>