mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Provide credentials to relative links only (#6360)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
parent
5078dc1cbf
commit
e375408777
@ -23,7 +23,7 @@ const _load = (
|
|||||||
if (type) {
|
if (type) {
|
||||||
(element as HTMLScriptElement).type = type;
|
(element as HTMLScriptElement).type = type;
|
||||||
// https://github.com/home-assistant/frontend/pull/6328
|
// https://github.com/home-assistant/frontend/pull/6328
|
||||||
(element as HTMLScriptElement).crossOrigin = "use-credentials";
|
(element as HTMLScriptElement).crossOrigin = url.substr(0, 1) === "/" ? "use-credentials" : "anonymous";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "link":
|
case "link":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user