title: How to solve Cross-Origin Request Blocked error in firefox
body: <pre><code>&lt;script&gt;
      $.getJSON('url', function (data) {
          console.log("Before:"+data);
          t = data;
          console.log("After:"+t);
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>When I am using <code>getJson</code> method to get data from REST API , I am getting the error:</p>
  
  <blockquote>
    <p>Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at the url. This can be fixed by moving the resource to the same domain or enabling CORS.</p>
  </blockquote>
  
  <p>How do I solve this? Please help.</p>