'Cross-Origin Read Blocking (CORB) Issue with getting JSON data
When I click "Get Key", it keeps saying:
Cross-Origin Read Blocking (CORB) blocked cross-origin response
https://www.infinityfree.net/errors/404/
with MIME type text/html. Seehttps://www.chromestatus.com/feature/5629709824032768
for more details.
I have tried some method like How to stop CORB from blocking requests to data resources that respond with CORS headers? but still having the same issue.
My Script:
<script>
function getKey()
{
var database = $.getJSON('https://lynzvhub.xyz/Key/Data.json.php', function(data){
const keys = Object.keys(data);
var copyKey = document.getElementById("KeyDisplay");
document.getElementById('KeyDisplay').value = keys[Math.floor(Math.random()*49)]
document.getElementById('Button').textContent = "Copied Key"
copyKey.select();
navigator.clipboard.writeText(copyKey.value);
});
}
</script>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|