Skip to content

Commit

Permalink
Add new build variable for ensuring editor crossorigin isolation headers
Browse files Browse the repository at this point in the history
  • Loading branch information
adamscott committed Nov 6, 2024
1 parent 87318a2 commit ea49178
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platform/web/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ def get_opts():
"Use Emscripten PROXY_TO_PTHREAD option to run the main application code to a separate thread",
False,
),
BoolVariable(
"editor_ensure_crossorigin_isolation_headers",
"Ensure crossorigin isolation headers for the editor build",
True,
),
]


Expand Down
3 changes: 3 additions & 0 deletions platform/web/emscripten_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ def create_template_zip(env, js, wasm, worker, side):
"___GODOT_OPT_CACHE___": json.dumps(opt_cache),
"___GODOT_OFFLINE_PAGE___": "offline.html",
"___GODOT_THREADS_ENABLED___": "true" if env["threads"] else "false",
"___GODOT_ENSURE_CROSSORIGIN_ISOLATION_HEADERS___": (
"true" if env["editor_ensure_crossorigin_isolation_headers"] else "false"
),
}
html = env.Substfile(target="#bin/godot${PROGSUFFIX}.html", source=html, SUBST_DICT=subst_dict)
in_files.append(html)
Expand Down

0 comments on commit ea49178

Please sign in to comment.