CORS header 'Access-Control-Allow-OrigCross-Origin Request Blocked yii2
<p>I'm using yii2 rest api.
I want to get my information by ajax but I'm getting this error.</p>

<pre><code>Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://........... (Reason: CORS header 'Access-Control-Allow-Origin' missing).
</code></pre>

<p>How can I fix this problem?</p>