Introduction
As a website owner or developer, it's essential to stay up-to-date with the latest changes and updates to the
Google Maps API. With the decommissioning of version 3.49 of the Google Maps JavaScript API in Q2 2023, it is now necessary to update your site's
Content Security Policy (CSP) to maintain uninterrupted access to the API. This article will guide you through the process of updating your CSP to allow-list googleapis.com, ensuring continued support and optimal performance for your website or web app.
What You Need to Know
The Maps JavaScript API will no longer support CSP directives that do not specify googleapis.com after version 3.49 is decommissioned. While allowing maps.googleapis.com may work temporarily, it will not be sufficient in the future. To maintain a seamless experience for your users, you must authorize googleapis.com in your CSP instead.
What You Need to Do
If your site does not have a CSP or already has googleapis.com correctly allow-listed, no changes are required. However, if you need to update your CSP to include googleapis.com, follow these steps:
- Review the Content Security Policy guide for the Maps JavaScript API to understand the technical requirements and best practices.
- Visit the Content Security Policy main site for more information and help regarding CSP implementation and updates.
- Update your site's CSP to allow-list googleapis.com at your earliest convenience, regardless of the Maps JavaScript API version currently in use.
Version Schedule and Updating
Version 3.50 of the Maps JavaScript API was loaded into the weekly channel beginning August 2022 and into the quarterly channel beginning November 2022. If you need more time to update your CSP, ensure you specify v=3.49 before these dates to continue receiving support until the decommissioning in April 2023.
After updating your CSP, you can return to specifying v=weekly or v=quarterly for your API version. For more information about specifying channels and versions, consult the Maps JavaScript API versioning guide from Google.
Conclusion
Staying updated with API changes is crucial for providing the best possible experience for your website or web app users. By updating your site's CSP to allow-list googleapis.com, you can ensure continued access to the Maps JavaScript API and maintain a smooth experience for your users. Act now to make the necessary changes before the decommissioning of version 3.49 in Q2 2023.