Skip to content

Commit 2a0f89d

Browse files
authored
Add default content security policy (#8)
1 parent 5559f55 commit 2a0f89d

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

astro.config.mjs

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,32 @@ import { defineConfig, fontProviders } from 'astro/config';
55

66
// https://astro.build/config
77
export default defineConfig({
8-
site: 'https://www.hotfix.day',
9-
integrations: [mdx(), sitemap()],
10-
fonts: [
11-
{
12-
provider: fontProviders.local(),
13-
name: 'Atkinson',
14-
cssVariable: '--font-atkinson',
15-
options: {
16-
variants: [
17-
{
18-
src: ['./src/assets/fonts/atkinson-regular.woff'],
19-
weight: 400,
20-
style: 'normal',
21-
},
22-
{
23-
src: ['./src/assets/fonts/atkinson-bold.woff'],
24-
weight: 700,
25-
style: 'normal',
26-
},
27-
],
28-
},
29-
},
30-
],
8+
site: 'https://www.hotfix.day',
9+
integrations: [mdx(), sitemap()],
10+
security: {
11+
csp: {
12+
directives: ["default-src 'self'"],
13+
},
14+
},
15+
fonts: [
16+
{
17+
provider: fontProviders.local(),
18+
name: 'Atkinson',
19+
cssVariable: '--font-atkinson',
20+
options: {
21+
variants: [
22+
{
23+
src: ['./src/assets/fonts/atkinson-regular.woff'],
24+
weight: 400,
25+
style: 'normal',
26+
},
27+
{
28+
src: ['./src/assets/fonts/atkinson-bold.woff'],
29+
weight: 700,
30+
style: 'normal',
31+
},
32+
],
33+
},
34+
},
35+
],
3136
});

0 commit comments

Comments
 (0)