Google API not recognizing allowed domain

Hi there, everyone,

I’m trying to build a membermap and am having a problem with Google’s api restriction system. I’ve told it to allow the domain:

But when I try the map at , the map fails to load and the javascript console reports:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at (Reason: CORS request did not succeed). Status code: (null).

Google Maps JavaScript API error: RefererNotAllowedMapError
Your site URL to be authorized:

What am I doing wrong? I followed the Google API doc for creating the project, adding the restriction and enabling javascript embed.

Any help would be greatly appreciated. Thanks for your time!

To allow cors, you normally have some requirements on the headers you send to the server as well.

Mostly you need to send at minimum your Origin.

I would suggest to use PostMan to first check the connection to the API and after it works in this tool, you can start to implement it in your Website.

does not match **

Look closely at the beginning…

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.