Skip to content

Instantly share code, notes, and snippets.

@glasses618
Last active June 20, 2021 12:51
Show Gist options
  • Save glasses618/fb65f67cfd5e67a10b2ba1d7ed5a0229 to your computer and use it in GitHub Desktop.
Save glasses618/fb65f67cfd5e67a10b2ba1d7ed5a0229 to your computer and use it in GitHub Desktop.
CORS Example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<img src="https://someawscdn.cloudfront.net/image.png">
<script>
setTimeout(function () {
var oReq = new XMLHttpRequest();
oReq.open("GET", "https://someawscdn.cloudfront.net/image.png");
oReq.send();
}, 5000);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment