Policy in Iframe not loading

Godot Version

4.2

Question

I have hosted all games on firebase hosting and if you try to go to play a game in url godot game works. Here is link: https:// api. technoviumunlimited .nl/games/Ag7KtmdKNIG0va7bi1ne/ If I try to load it from iframe: https:// technoviumunlimited .nl/games/Ag7KtmdKNIG0va7bi1ne I get error:

Error
The following features required to run Godot projects on the Web are missing:
Cross Origin Isolation - Check web server configuration (send correct headers)
SharedArrayBuffer - Check web server configuration (send correct headers)

firebase.json

{
  "hosting": {
    "public": "public", 
    "headers": [
      {
        "source": "/games/**",
        "headers": [
          {
            "key": "Cross-Origin-Embedder-Policy",
            "value": "require-corp"
          },
          {
            "key": "Cross-Origin-Opener-Policy",
            "value": "same-origin"
          },
          {
            "key": "Cross-Origin-Resource-Policy",
            "value": "cross-origin"
          },
          {
            "key": "SharedArrayBuffer",
            "value": "true"
          }
        ]
      },
      {
        "source": "/**/*.wasm",
        "headers": [
          {
            "key": "Cross-Origin-Resource-Policy",
            "value": "cross-origin"
          },
          {
            "key": "SharedArrayBuffer",
            "value": "true"
          }
        ]
      },
      {
        "source": "/**/*.css",
        "headers": [
          {
            "key": "Cross-Origin-Resource-Policy",
            "value": "cross-origin"
          },
          {
            "key": "SharedArrayBuffer",
            "value": "true"
          }
        ]
      },
      {
        "source": "/**/*.worker.js",
        "headers": [
          {
            "key": "Cross-Origin-Resource-Policy",
            "value": "cross-origin"
          },
          {
            "key": "SharedArrayBuffer",
            "value": "true"
          }
        ]
      },
      {
        "source": "/**",
        "headers": [
          {
            "key": "Cross-Origin-Resource-Policy",
            "value": "cross-origin"
          },
          {
            "key": "SharedArrayBuffer",
            "value": "true"
          }
        ]
      }
    ],
    
    
    "rewrites": [
      {
        "source": "/games/**",
        "destination": "/index.html"
      },
      {
        "source": "**",
        "function": "app",
        "region": "us-central1"
      }
    ]
  },
  "functions": [
    {
      "source": "functions",
      "codebase": "default",
      "ignore": [
        "node_modules",
        ".git",
        "firebase-debug.log",
        "firebase-debug.*.log"
      ]
    }
  ]
}

I’m running into this same issue, though I’m using AWS S3 with CloudFront. The game loads from the URL, but gives identical errors when embedded.

I got same error. Have you find any solution for this?