nuxt-security
Version:
🛡️ Security Module for Nuxt based on HTTP Headers and Middleware
13 lines (12 loc) • 585 B
TypeScript
/**
* This plugin adds security hashes to the event context for later use in the CSP header.
* It only runs in SSG mode.
*
* Hashes are computed in `render:response` rather than `render:html` so that they are
* taken from the final serialized HTML, after all `render:html` listeners (including
* third-party modules that transform inline scripts/styles, e.g. minifiers) have run.
* This removes the dependency on plugin registration order when ensuring hashes match
* the served content.
*/
declare const _default: import("nitropack").NitroAppPlugin;
export default _default;