UNPKG

nuxt

Version:

Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.

8 lines (7 loc) • 258 B
//#region src/runtime/server/renderer/csp-nonce.ts const SCRIPT_NONCE_RE = /<script(?=[\s>])[^>]*?\snonce="([\w+/\-=]*)"/; function extractCspNonce(headTags) { return SCRIPT_NONCE_RE.exec(headTags)?.[1] || void 0; } //#endregion export { extractCspNonce };