-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredirects.js
44 lines (39 loc) · 1.12 KB
/
redirects.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
const redirects = async () => {
const internetExplorerRedirect = {
destination: '/ie-incompatible.html',
has: [
{
type: 'header',
key: 'user-agent',
value: '(.*Trident.*)', // all ie browsers
},
],
permanent: false,
source: '/:path((?!ie-incompatible.html$).*)', // all pages except the incompatibility page
}
// 目前在 ingress 里面直接配置了,这里 env 需要 build 阶段生效,比较麻烦
// const redirectToApp = {
// source: '/:path(home|detail|share|login|profile|settings|auth)/:rest*',
// destination: `${process.env.MUSE_BASE_URL}/:path/:rest*`,
// permanent: true,
// }
const restRedirects = [
// {
// source: '/pricing',
// destination: 'https://app.museai.cc/pricing',
// permanent: true,
// },
// {
// source: '/account/orders/:rest*',
// destination: 'https://app.museai.cc/team/billing/orders/:rest*',
// permanent: true,
// },
]
const redirects = [
internetExplorerRedirect,
// redirectToApp,
...restRedirects,
]
return redirects
}
export default redirects