-
Notifications
You must be signed in to change notification settings - Fork 0
/
rewrites.js
40 lines (38 loc) · 1.42 KB
/
rewrites.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
let rewrite = [
{ source: '/api/:path*', destination: 'https://did-portkey.portkey.finance/api/:path*' },
{
source: '/AElfIndexer_DApp/PortKeyIndexerCASchema/:path*',
destination: 'https://dapp-portkey.portkey.finance/Portkey_DID/PortKeyIndexerCASchema/:path*',
},
{
source: '/BingoGame_DApp/BingoGameIndexerCASchema/:path*',
destination: 'https://dapp-portkey.portkey.finance/AElfIndexer_BingoGame/BingoGameIndexerCASchema/:path*',
},
];
if (process.env.NEXT_PUBLIC_APP_ENV === 'development') {
rewrite = [
{ source: '/api/:path*', destination: 'http://192.168.66.240:15577/api/:path*' },
{
source: '/AElfIndexer_DApp/:path*',
destination: 'http://192.168.67.172:8083/AElfIndexer_DApp/:path*',
},
{
source: '/BingoGame_DApp/:path*',
destination: 'http://192.168.67.172:8090/BingoGame_DApp/:path*',
},
];
}
if (process.env.NEXT_PUBLIC_APP_ENV === 'test') {
rewrite = [
{ source: '/api/:path*', destination: 'https://did-portkey-test.portkey.finance/api/:path*' },
{
source: '/AElfIndexer_DApp/PortKeyIndexerCASchema/:path*',
destination: 'https://dapp-portkey-test.portkey.finance/Portkey_DID/PortKeyIndexerCASchema/:path*',
},
{
source: '/BingoGame_DApp/BingoGameIndexerCASchema/:path*',
destination: 'https://dapp-portkey-test.portkey.finance/AElfIndexer_BingoGame/BingoGameIndexerCASchema/:path*',
},
];
}
module.exports = rewrite;