- Home /
Google Maps SDK CORS policy is breaking my WebGL build
This error breaks my build on both localhost and my server.
Access to XMLHttpRequest at 'https://play.googleapis.com/log' from origin 'mydomain.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'http://play.google.com' that is not equal to the supplied origin.
I cannot edit the headers of the API call to google because it is contained within the .dll file.
If my understanding of CORS is correct, I would need to configure my Google Console to allow for API calls from my domain. But Google has terrible documentation regarding their Unity SDK so I can't find any information on the matter. Surely I'm not the only person to have these issues?
Please advise