How can I solve No 'Access-Control-Allow-Origin' header is present on the requested resource in axios? : <p>My vue script like this :</p>

<pre><code>&lt;script&gt;
export default {
    ...
    methods : {
        login() {
            // uri -&gt; http://my-app.test/login?email=test@gmail.com&amp;password=1234
            this.axios.get(uri).then((response) =&gt; {
                console.log(response)
                ...
            },
            ...
        }
    }
}
&lt;/script&gt;
</code></pre>

<p>When login method executed, on the console exist error like this :</p>

<blockquote>
  <p>Failed to load
  <a href="http://my-app.test/login?email=test@gmail.com&amp;password=1234" rel="nofollow noreferrer">http://my-app.test/login?email=test@gmail.com&amp;password=1234</a>: No
  'Access-Control-Allow-Origin' header is present on the requested
  resource. Origin '<a href="http://localhost:8080" rel="nofollow noreferrer">http://localhost:8080</a>' is therefore not allowed
  access.</p>
</blockquote>

<p>How can I solve the error?</p>
