How to integrate mapbox.com map into a Visual Builder project.
Trying to use Mapbox to display a map using the mapbox-gl.js. Everything works fine in Preview, but after deployment I see this error:
web_worker.js:9 Refused to create a worker from 'blob:https://development-idfig330webt-ia.integration.ocp.oraclecloud.com/e17e73df-1d18-44fe-9dff-81ecc05ae84c' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' 'unsafe-inline' https:". Note that 'worker-src' was not explicitly set, so 'script-src' is used as a fallback.
Mapbox provides a solution for this CSP violation. They provide a mapbox-gl-csp.js file, and a mapbox-gl-csp-worker.js file. The worker file has to have the same origin as the calling page and is used like this: