You’re running into CORS issues.
Some possible causes:
- The header
Access-Control-Allow-Origincan only be set on server side, not in your clients script. (You did not make clear you did that correctly.) - Are you sure the protocol (
httpvshttpsvs maybe evenfile) is exactly the same? - If you may have multiple sub domains you need to setup your config (e.g. Apache) with something like
"^http(s)?://(.+\.)?test\.com$
.
The^marks the start of the line to prevent anything preceeding this url. You need a protocol and allowing both here. A subdomain is optional. And the$marks the end of line (you don’t need to set sub-pages, because origin is only host based). - As stated here adding
Access-Control-Allow-Headers: Originto the server configuration as well may be a solution. Try to compare the actual requests made my Safari to the successfull requests done by Firefox or Chrome to spot possible missing Headers as well (and maybe compare them to your server configuration as well).