Hi Waqar
My apologies for missing out on the closing of the [wpv-for-each] tag.. I've fixed it and it works fine..:-)..
I had one quick query.. the MAPS API works only in Unrestricted Mode on Google Developers Console.. is this correct? Is there anyway I can have the API restricted to use only from my domains? If it's a feature request then can you please consider this as a feature request? Or please do guide me on how do I ask for this as a feature request.
Regards,
Alim
Hi Alim,
If you'll go to WP Admin -> Toolset -> Settings -> Maps, you'll see that there are two fields to enter Google Map API keys.
When only the main/primary key is added, it is used for both the client-side and the server-side requests.
The key with domain restriction works for the client-side requests, but not for the server-side ones. To overcome this limitation, the second optional key field was introduced.
When you'll include a second optional key, that will be used for the server-side requests, allowing you to use a primary key with the domain restriction turned on.
If your hosting server has a static IP, you can optionally enable IP restrictions on the second key too, but it is not neccessary, since this second key for the server-side requests is not publicaly exposed.
I hope this explaination helps.
regards,
Waqar
Hi Waqar
Thanks for the update..:-).. I am glad to know that this option exists where I can use restrictions for the API
I think I understand what you are saying but I just wanted to confirm one thing..
For the second optional key, do I use the same credentials?
OR
Do I create another set of credentials on Google Developer Console to use as the second optional key?
Please do advise.
Regards,
Alim
Hi Alim,
Yes, you'll use the new credentials option to create a seperate/independant key.
( screenshot: hidden link )
regards,
Waqar
Hi Waqar
Sorry for the delay.. was travelling a bit (I know 'travelling' does sound weird as an excuse during the pandemic..;-).. but in Bali we still can..;-)..)
Will have the credentials things tested asap and confirm with you.
Regards,
Alim
Sure, please take your time 🙂