I am developing a custom plugin with React for Kibana. I need to use google geocode and reverse geocode from google map API. But I am facing a problem when I inject the API script in my react component. It seems like it refuses to connect the Google Map API network. So the API throws a network error.
Refused to load the script 'https://maps.googleapis.com/maps/api/js?key={MY_API_KEY}&libraries=places%2Cgeometry' because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
I checked the component in a fresh react app outside the Kibana. The map loads easily there. But facing problem in Kibana. I am using Kibana 7.4.2 in -oss mode in localhost and an ElasticSearch is running in Elastic Cloud.
How can I approach and solve this issue?