-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
58 lines (57 loc) · 1.41 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
46
47
48
49
50
51
52
53
54
55
56
57
58
const { redirect } = require('next/dist/server/api-utils')
module.exports = {
trailingSlash: false,
async headers() {
return [
{
source: '/\\.well-known/matrix/:path*',
headers: [
{ key: 'access-control-allow-origin', value: '*' },
{ key: 'cache-control', value: 'public, max-age=604800' },
],
},
{
source: '/\\.well-known/openpgpkey/:path*',
headers: [
{ key: 'access-control-allow-origin', value: '*' },
{ key: 'cache-control', value: 'public, max-age=604800' },
],
},
{
source: '/:path*',
headers: [
{
key: 'Strict-Transport-Security',
value: 'max-age=63072000; includeSubDomains; preload;',
},
],
},
]
},
async redirects() {
return [
{
source: '/\\.well-known/matrix/client.json',
destination: '/.well-known/matrix/client',
permanent: true,
},
{
source: '/\\.well-known/matrix/server.json',
destination: '/.well-known/matrix/server',
permanent: true,
},
]
},
async rewrites() {
return [
{
source: '/\\.well-known/matrix/client',
destination: '/.well-known/matrix/client.json',
},
{
source: '/\\.well-known/matrix/server',
destination: '/.well-known/matrix/server.json',
},
]
},
}