header should specify the origin
, not the full URL. In this case, the origin would be
header is used to specify the name of the HTTP headers which can be sent. Specifying a URL for this header is invalid.
Cross-Origin Resource Sharing (CORS) - HTTP | MDN