Content Security Policy is blocking the BingMap's virtualearth.net (Street Side view) to render? How to make my BingMap to work with CSP implementation?

Hussain, Haidar 0 Reputation points
2024-01-31T12:51:17.5066667+00:00

I have implemented the BingMap and using its Street side view that is using virtualearth.net api to render the map. But this is also injecting the dynamic scripts and expecting the 'inline-eval' is allowed. But the Content Security Policy has restricted the inline-eval and unsafe-inline scripts to be allowed. Due to this, my virtualearth.net and street side view is not working. There some suggestions given to handle it by nonce and hashing the script in CSP policy. But since the Bing map scripts are generated dynamically at run time, I cannot define nonce or hash the scripts in my SCP. How to handle such scenario?

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
832 questions
{count} votes