Fetch policy for baseURI document.domain is empty.

This commit is contained in:
hackademix 2021-12-04 21:45:03 +01:00
parent b14f8ef5d0
commit bd7b621109
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@
if (url.startsWith("blob:")) { if (url.startsWith("blob:")) {
url = location.origin; url = location.origin;
} else if (/^(?:javascript|about):/.test(url)) { } else if (/^(?:javascript|about):/.test(url)) {
url = document.readyState === "loading" url = document.readyState === "loading" || !document.domain
? document.baseURI ? document.baseURI
: `${window.isSecureContext ? "https" : "http"}://${document.domain}`; : `${window.isSecureContext ? "https" : "http"}://${document.domain}`;
debug("Fetching policy for actual URL %s (was %s)", url, document.URL); debug("Fetching policy for actual URL %s (was %s)", url, document.URL);