mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-08 07:12:39 +02:00
feat(next.config): enable remote SVG support with enhanced content security policy
This commit is contained in:
parent
0654662d29
commit
a2ad697a29
1 changed files with 7 additions and 0 deletions
|
|
@ -29,6 +29,13 @@ const nextConfig: NextConfig = {
|
||||||
hostname: "**",
|
hostname: "**",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
// Allow remote SVGs (e.g. README badges from img.shields.io, trendshift.io,
|
||||||
|
// etc.) which are otherwise blocked by next/image. The CSP below sandboxes
|
||||||
|
// the SVG and forbids any embedded scripts, which is the mitigation
|
||||||
|
// recommended by Vercel's NEXTJS_SAFE_SVG_IMAGES conformance rule.
|
||||||
|
dangerouslyAllowSVG: true,
|
||||||
|
contentDispositionType: "attachment",
|
||||||
|
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
|
||||||
},
|
},
|
||||||
experimental: {
|
experimental: {
|
||||||
optimizePackageImports: [
|
optimizePackageImports: [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue