Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+7
@@ -0,0 +1,7 @@
|
||||
import { isValidCspNonce } from "./contentSecurityPolicy";
|
||||
|
||||
/** Reads the browser-normalized nonce property from an already trusted script. */
|
||||
export function getCurrentDocumentCspNonce(documentRef: Document): string | undefined {
|
||||
const nonce = documentRef.querySelector<HTMLScriptElement>("script[nonce]")?.nonce;
|
||||
return isValidCspNonce(nonce) ? nonce : undefined;
|
||||
}
|
||||
Reference in new issue
Block a user