Two or more documents can be considered in the same domain origin if they have - The same host - The same port - The same protocol. In your case, the port is different, so you cannot deliver an ajax request directly. Instead, you need to provide the following answer in response.
Access-Control-Allow-Origin: mycompany.com
For more information, check this.
source share