Add cross-origin resource sharing (CORS) header to the request
The following viewer request function adds an Origin
HTTP header to the
request if the request doesn’t already contain this header. This header is part of
cross-origin
resource sharing (CORS)Host
header. For more information, see Origin