tomchentw / react-google-maps

React.js Google Maps integration component

Home Page:https://tomchentw.github.io/react-google-maps/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems while implementing Content Security Policy

BrodaNoel opened this issue · comments

Hello everyone!

I'm trying to implement CSP but I have some issues with Google Maps in this library.
https://developers.google.com/maps/documentation/javascript/content-security-policy

The point is that I already added all the Google Domains, but I can't add the nonce for the inline-styles that Google Maps creates, so, all the buttons in the map gets duplicated because clearly some inline CSS get broken.

Any of you had any problem with this?

If you don't know what I'm talking about, do this:

  • Open https://snyk.io/website-scanner/
  • Scan your website
  • Check if you have a Content Security Policy problem
  • Try to fix it.
  • Open your page where you have the Map

There you are going to see some broken buttons.

@BrodaNoel This package is unmaintained 4+ years. please look at @react-google-maps/api instead.
As I know we have solved an issue.
It is not a drop-in replacement, please read docs.