Provide credentials to relative links only (#6360)

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
Rohan Kapoor 2020-07-10 17:29:29 -07:00 committed by GitHub
parent 5078dc1cbf
commit e375408777
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ const _load = (
if (type) {
(element as HTMLScriptElement).type = type;
// 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;
case "link":