Skip to content

Commit d7d6e73

Browse files
committed
feat: add CSP card to "And there's more" grid
1 parent af959e9 commit d7d6e73

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

www/components/homepage/MoreFeatures.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,37 @@ const features = [
164164
});`,
165165
lang: "js" as const,
166166
},
167+
{
168+
title: "Content Security Policy",
169+
description:
170+
"Automatic nonce injection for inline scripts and styles — strong security defaults with zero boilerplate.",
171+
href: "/docs/plugins/csp",
172+
icon: (
173+
<svg
174+
aria-hidden="true"
175+
xmlns="http://www.w3.org/2000/svg"
176+
class="text-fresh"
177+
width="1.5rem"
178+
height="1.5rem"
179+
viewBox="0 0 24 24"
180+
stroke-width="1.5"
181+
stroke="currentColor"
182+
fill="none"
183+
stroke-linecap="round"
184+
stroke-linejoin="round"
185+
>
186+
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
187+
<path d="M11.46 20.846a12 12 0 0 1 -7.96 -14.846a12 12 0 0 0 8.5 -3a12 12 0 0 0 8.5 3a12 12 0 0 1 -.09 7.06" />
188+
<path d="M15 19l2 2l4 -4" />
189+
</svg>
190+
),
191+
code: `app.use(csp({
192+
directives: {
193+
scriptSrc: ["'nonce'"],
194+
},
195+
}));`,
196+
lang: "js" as const,
197+
},
167198
];
168199

169200
export function MoreFeatures() {

0 commit comments

Comments
 (0)