mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 07:20:02 -04:00
fix some jank
This commit is contained in:
parent
4f5ae7b18a
commit
db837b42c7
5 changed files with 44 additions and 9 deletions
|
@ -218,7 +218,17 @@ async function handleResponse(
|
|||
// scramjet runtime can use features that permissions-policy blocks
|
||||
delete responseHeaders["permissions-policy"];
|
||||
|
||||
if (crossOriginIsolated) {
|
||||
if (
|
||||
crossOriginIsolated &&
|
||||
[
|
||||
"document",
|
||||
"iframe",
|
||||
"worker",
|
||||
"sharedworker",
|
||||
"style",
|
||||
"script",
|
||||
].includes(destination)
|
||||
) {
|
||||
responseHeaders["Cross-Origin-Embedder-Policy"] = "require-corp";
|
||||
responseHeaders["Cross-Origin-Opener-Policy"] = "same-origin";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue