Skip to content

Instantly share code, notes, and snippets.

@glasses618
Last active June 20, 2021 13:25
Show Gist options
  • Save glasses618/3fceb72285bb5209861dfdc27bda10f6 to your computer and use it in GitHub Desktop.
Save glasses618/3fceb72285bb5209861dfdc27bda10f6 to your computer and use it in GitHub Desktop.
CORS Example 2
<!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?cors=1");
oReq.send();
}, 5000);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment