我正在尝试通过p5.js中的Web编辑器使用Firebase,我正在使用脚本标签从CDN加载Firebase,如下所示:
<script src="https://www.gstatic.com/firebasejs/6.3.4/firebase-app.js" ></script>
整个示例可以在此处查看https://editor.p5js.org/zebratdi/full/2xh1Yy5fn
但是我遇到了CORS问题:
Access to script at 'https://www.gstatic.com/firebasejs/6.3.4/firebase-app.js' from origin 'https://editor.p5js.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
知道如何在没有CORS问题的情况下加载Firebase脚本吗?