Firebase 上的子资源完整性安全 header

Subresource Integrity security header on Firebase

SRI - Firebase 上的子资源完整性安全功能

对此有何建议?非常感谢!

index.html

    <!-- OneSignal -->
    <script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" integrity="sha256-t1LT+Y2Mggg3CziqvOSn//47ekhB3IWvczG5g5pZF5I= sha384-vVrIVOhTb6P+4WMvVY4OhcO9b04Pt1kfcrkiTi3q8b/MG7kRwiNSIuhmKBnlKA3W sha512-zI/26urvS8F5oBQj4MChQbf8jVDP06RucbNYHuTguAxo3h8PXgFlM175kxarwnM9y0wTVjGAXe5JWIHsRMK2kw==" crossorigin="anonymous" async></script>

firebase.json

  "headers": [
    {
      "source": "**",
      "headers": [
        {
          "key": "Access-Control-Allow-Origin",
          "value": "https://cdn.onesignal.com/"
        },
        {
          "key": "Vary",
          "value": "Origin"
        }
      ]
    }
 ]

注意:为了 subresource-integrity 验证来源不是嵌入文档的资源,浏览器会使用 Cross-Origin 资源共享 (CORS) 额外检查资源,以确保为资源提供服务的源允许它与请求源共享。 Subresource_Integrity

您是否尝试过将函数设置为 public? 不知道那是否真的是您要找的东西。 https://cloud.google.com/functions/docs/securing/managing-access-iam#allowing_unauthenticated_function_invocation