mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Enable CORS for legacy bundle loading (#18248)
This commit is contained in:
parent
3b2f6d71f5
commit
d88831b719
@ -194,6 +194,7 @@ const createWebpackConfig = ({
|
|||||||
isProdBuild && !isStatsBuild ? "[id]-[contenthash].js" : "[name].js",
|
isProdBuild && !isStatsBuild ? "[id]-[contenthash].js" : "[name].js",
|
||||||
assetModuleFilename:
|
assetModuleFilename:
|
||||||
isProdBuild && !isStatsBuild ? "[id]-[contenthash][ext]" : "[id][ext]",
|
isProdBuild && !isStatsBuild ? "[id]-[contenthash][ext]" : "[id][ext]",
|
||||||
|
crossOriginLoading: "use-credentials",
|
||||||
hashFunction: "xxhash64",
|
hashFunction: "xxhash64",
|
||||||
hashDigest: "base64url",
|
hashDigest: "base64url",
|
||||||
hashDigestLength: 11, // full length of 64 bit base64url
|
hashDigestLength: 11, // full length of 64 bit base64url
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
<script>
|
<script>
|
||||||
function _ls(src, sync) {
|
function _ls(src, notCustom) {
|
||||||
var script = document.createElement("script");
|
var script = document.createElement("script");
|
||||||
if (sync) {
|
if (notCustom) {
|
||||||
script.async = false;
|
script.async = false;
|
||||||
|
script.crossOrigin = "use-credentials";
|
||||||
}
|
}
|
||||||
script.src = src;
|
script.src = src;
|
||||||
return document.head.appendChild(script);
|
return document.head.appendChild(script);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user