Simple JavaScript requests

GET request with correct CORS setup

Summary

JavaScript code can make a cross-origin GET request. The response must include the correctly configured Access-Control-Allow-Origin header.

Instructions

  1. Hit green button below and see successful response returned
  2. Observe difference between source and request origins, confirming cross-origin request
View source on GitHub | Created by Tom Gregory