-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathnext.config.js
More file actions
39 lines (39 loc) · 885 Bytes
/
next.config.js
File metadata and controls
39 lines (39 loc) · 885 Bytes
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
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
staticImage: true,
latex: true,
flexsearch: {
codeblocks: false,
},
defaultShowCopyCode: true,
})
module.exports = withNextra({
async headers() {
return [
{
source: '/(.*)',
headers: [
// Prevents the page from being loaded in an iframe (clickjacking prevention)
{ key: 'Content-Security-Policy', value: `frame-ancestors 'none';`}
],
},
]
},
async redirects() {
return [
{
source: '/sdk-info',
destination: '/sdk',
permanent: false,
},
// Just redirect any slug to the main page for now, not sure if they map
// the same
{
source: '/sdk-info/:slug*',
destination: '/sdk',
permanent: false,
},
]
},
})