title: my firebase web app is not enabling cors in my firebase.json file
body: <p>firebase.json file:</p>
  <pre><code>{
    &quot;hosting&quot;: {
      &quot;public&quot;: &quot;public&quot;,
      &quot;cleanUrls&quot;: true,
      &quot;headers&quot;: [
        {
          &quot;source&quot;: &quot;**&quot;,
          &quot;headers&quot;: [
            {
              &quot;key&quot;: &quot;Access-Control-Allow-Origin&quot;,
              &quot;value&quot;: &quot;*&quot;
            }
          ]
        }
      ]
    }
  }
  </code></pre>
  <p>I Thought this would have fixed the issue but from my main page index.html, but when i use the code, it still blocked do to cores policy and i dont have the budget to get firebase functions right now but i got the firebase.json code from another post but it didnt help:</p>
  <pre><code>function download_file(val, filename) {
      var storage = firebase.storage();
      
      
      storage.ref(val).getDownloadURL().then(function(url) {
        // `url` is the download URL for 'images/stars.jpg'
      
        alert(url, filename)
        
  
        // This can be downloaded directly:
      var xhr = new XMLHttpRequest();
      xhr.responseType = 'blob';
      xhr.onload = (event) =&gt; {
        var blob = xhr.response;
      };
      xhr.open('GET', url);
      xhr.send();
        
      
       
      }).catch(function(error) {
        console.log(error)
      });
    }
  </code></pre>
  <p>PLEASE dont close this post, instead ill mark it fixed, i dont wanna get banned from it so please... I Got My Code From Here: LINK[Stack Overflow Post][1]</p>
  <p>[1]: <a href="https://stackoverflow.com/questions/30927956/access-control-allow-origin-added-to-firebase-json-but-missing-from-the-file-res">Access-Control-Allow-Origin added to firebase.json but missing from the file response header</a> But its not working...</p>