From ebc2847da9c86a33f94a27b16ee83c18727af827 Mon Sep 17 00:00:00 2001 From: bt <99624770+besated@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:38:56 -0700 Subject: [PATCH] Add CSP for images (#143) * Add csp to image in next config * Don't optimize images * Use custom loader instead of middleware * Remove custom image loader --- next.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/next.config.js b/next.config.js index 89e9492..ceb622c 100644 --- a/next.config.js +++ b/next.config.js @@ -5,6 +5,8 @@ const withNextra = require('nextra')({ module.exports = withNextra({ images: { + unoptimized: true, + contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;", remotePatterns: [ { protocol: 'https',