Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/security-headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ import { TRUSTED_IMAGE_DOMAINS } from '#server/utils/image-proxy'
export default defineNuxtModule({
meta: { name: 'security-headers' },
setup(_, nuxt) {
const isDevtoolsRuntime =
nuxt.options.dev && nuxt.options.devtools !== false && !process.env.TEST

// Nuxt DevTools relies on injected client assets and an iframe-based UI in dev.
// Keep strict CSP/frame restrictions for non-dev environments.
if (isDevtoolsRuntime) return

// These assets are embedded directly on blog pages and should not affect image-proxy trust.
const cspOnlyImgOrigins = ['https://api.star-history.com', 'https://cdn.bsky.app']
const imgSrc = [
Expand Down
Loading