From f5dce18655cf9f119577ca4f83c73fe83cc95423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Raffray?= Date: Tue, 17 Oct 2023 19:51:33 +0200 Subject: [PATCH] remove temporary code - revert playground config setup to basis - remove uneccessary tryUseNuxt import in 99-cspNonce --- playground/nuxt.config.ts | 11 +---------- src/runtime/nitro/plugins/99-cspNonce.ts | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts index 9bd9de98..f2204a21 100644 --- a/playground/nuxt.config.ts +++ b/playground/nuxt.config.ts @@ -19,16 +19,7 @@ export default defineNuxtConfig({ // Global configuration security: { headers: { - xXSSProtection: '0', - contentSecurityPolicy: { - 'style-src': ["'self'", "'nonce-{{nonce}}'"], - 'script-src': [ - "'self'", // backwards compatibility for older browsers that don't support strict-dynamic - "'nonce-{{nonce}}'", - "'strict-dynamic'" - ], - 'script-src-attr': ["'self'", "'nonce-{{nonce}}'", "'strict-dynamic'"] - } + xXSSProtection: '0' }, rateLimiter: { tokensPerInterval: 10 diff --git a/src/runtime/nitro/plugins/99-cspNonce.ts b/src/runtime/nitro/plugins/99-cspNonce.ts index 431b217d..648efaf5 100644 --- a/src/runtime/nitro/plugins/99-cspNonce.ts +++ b/src/runtime/nitro/plugins/99-cspNonce.ts @@ -4,7 +4,6 @@ import type { ModuleOptions } from '../../../types' import { useRuntimeConfig } from '#imports' -import { tryUseNuxt } from '@nuxt/kit' interface NuxtRenderHTMLContext { island?: boolean