/
next.config.js
45 lines (41 loc) · 1.06 KB
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/** @type {import('next').NextConfig} */
/**
* Configuration required to fetch set svgs from scryfall
*
* https://nextjs.org/docs/pages/api-reference/components/image#dangerouslyallowsvg
*/
const dangerouslyAllowSvg = {
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
};
const scryfallSvgsApi = {
protocol: 'https',
hostname: 'svgs.scryfall.io',
};
const scryfallCardsApi = {
protocol: 'https',
hostname: 'cards.scryfall.io',
};
const nextConfig = {
images: {
...dangerouslyAllowSvg,
remotePatterns: [scryfallCardsApi, scryfallSvgsApi],
},
// Use the following to define custom headers for specific requests
// https://nextjs.org/docs/app/api-reference/next-config-js/headers
// async headers() {
// return [
// {
// source: '*svgs.scryfall.io*',
// headers: [
// {
// key: 'x-hello',
// value: 'there',
// },
// ],
// },
// ];
// },
};
module.exports = nextConfig;