We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2a7b59 commit f02eb39Copy full SHA for f02eb39
modules/security-headers.ts
@@ -20,6 +20,13 @@ import { TRUSTED_IMAGE_DOMAINS } from '#server/utils/image-proxy'
20
export default defineNuxtModule({
21
meta: { name: 'security-headers' },
22
setup(_, nuxt) {
23
+ const isDevtoolsRuntime =
24
+ nuxt.options.dev && nuxt.options.devtools !== false && !process.env.TEST
25
+
26
+ // Nuxt DevTools relies on injected client assets and an iframe-based UI in dev.
27
+ // Keep strict CSP/frame restrictions for non-dev environments.
28
+ if (isDevtoolsRuntime) return
29
30
// These assets are embedded directly on blog pages and should not affect image-proxy trust.
31
const cspOnlyImgOrigins = ['https://api.star-history.com', 'https://cdn.bsky.app']
32
const imgSrc = [
0 commit comments