mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
4d24f465e3
adev is cross-origin isolated (COOP same-origin + COEP require-corp) so the
embedded WebContainer editor can use SharedArrayBuffer. Under require-corp the
cross-origin YouTube iframe in `<docs-video>` only loaded in Chromium, leaving
the player blank in Safari.
Switch COEP from `require-corp` to `credentialless`. The page stays cross-origin
isolated, so the editor keeps working, but cross-origin frames are now allowed
to load, which restores the inline player in Safari as well.
(cherry picked from commit 86cd166141)
87 lines
2.1 KiB
JSON
87 lines
2.1 KiB
JSON
{
|
|
"hosting": {
|
|
"target": "angular-docs",
|
|
"public": "./build/browser",
|
|
"ignore": ["**/.*"],
|
|
"trailingSlash": false,
|
|
"headers": [
|
|
{
|
|
"source": "assets/images/tutorials/common/*.jpg",
|
|
"headers": [
|
|
{
|
|
"key": "Cross-Origin-Resource-Policy",
|
|
"value": "cross-origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Origin",
|
|
"value": "*"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"source": "assets/others/versions.json",
|
|
"headers": [
|
|
{
|
|
"key": "Cross-Origin-Resource-Policy",
|
|
"value": "cross-origin"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Origin",
|
|
"value": "*"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"source": "/**/*-[0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_].*",
|
|
"headers": [
|
|
{
|
|
"key": "Cache-Control",
|
|
"value": "public,max-age=31536000,immutable"
|
|
},
|
|
{
|
|
"key": "Access-Control-Allow-Origin",
|
|
"value": "*"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"source": "/[0-9a-f][0-9a-f][0-9a-f].[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].js",
|
|
"headers": [
|
|
{
|
|
"key": "Cross-Origin-Embedder-Policy",
|
|
"value": "credentialless"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"source": "/@(ngsw-worker.js|ngsw.json)",
|
|
"headers": [
|
|
{
|
|
"key": "Cache-Control",
|
|
"value": "no-cache"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"source": "/**",
|
|
"headers": [
|
|
{
|
|
"key": "Cross-Origin-Opener-Policy",
|
|
"value": "same-origin"
|
|
},
|
|
{
|
|
"key": "Cross-Origin-Embedder-Policy",
|
|
"value": "credentialless"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"rewrites": [
|
|
{
|
|
"source": "**",
|
|
"destination": "/index.html"
|
|
}
|
|
]
|
|
}
|
|
}
|