Web export with cutstom.py gives cross origin errors on self signed certificates

Godot Version

godot-4

Question

On a embedded device (BeagleboneBlack) i use a self signed certificate with lighttpd server to serve a godot webfrontend for the browser using https. When using the stock export template for web everything is working correctly. No cross origin errors, Everything works great.

Since i want to reduce the sice of the exported wasm i created a custom.py file to test if it runs w/o optimisiations:


#custom.py
target="template_release"
debug_symbols="yes"

When i export my godot project with the new export template and serve it on my Beaglebone i will get the following error in my browser:

Uncaught (in promise) DataCloneError: Failed to execute 'postMessage' on 'Worker': SharedArrayBuffer transfer requires self.crossOriginIsolated.

The Godot projecet is a simple panel with a button.

Hasy anybody an idea ?