1
1
/**
2
2
* init base route
3
3
*/
4
- import Config from "../config" ;
5
- import { ApiSixHttpUtils } from "./apisix-gateway-utils" ;
6
- import { logger } from "./logger" ;
4
+ import Config from "../config"
5
+ import { ApiSixHttpUtils } from "./apisix-gateway-utils"
6
+ import { logger } from "./logger"
7
7
8
- const fs = require ( 'fs' ) ;
8
+ const fs = require ( 'fs' )
9
9
10
10
const baseUrl = 'http://gateway:9080'
11
11
@@ -28,10 +28,12 @@ export async function initBaseSSL() {
28
28
let ssl = await getGlobalSSL ( )
29
29
if ( ssl == null || ssl . validity_end < new Date ( ) . getTime ( ) / 1000 ) {
30
30
initGlobalSSL ( )
31
+ initGlobalOssSSL ( )
31
32
}
32
33
ssl = await getGlobalOssSSL ( )
33
34
if ( ssl == null || ssl . validity_end < new Date ( ) . getTime ( ) / 1000 ) {
34
35
initGlobalSSL ( )
36
+ initGlobalOssSSL ( )
35
37
}
36
38
} , 1000 * 60 * 60 * 24 )
37
39
@@ -45,7 +47,7 @@ function initSystemClientRoute() {
45
47
hosts : [ Config . SYS_CLIENT_HOST ] ,
46
48
upstream : {
47
49
type : 'roundrobin' ,
48
- nodes : { 'system-client:8080' : 1 }
50
+ nodes : { 'system-client:8080' : 1 }
49
51
} ,
50
52
priority : 0 ,
51
53
timeout : {
@@ -64,7 +66,7 @@ function initAppConsoleRoute() {
64
66
hosts : [ Config . SYS_CLIENT_HOST ] ,
65
67
upstream : {
66
68
type : 'roundrobin' ,
67
- nodes : { 'app-console:8080' : 1 }
69
+ nodes : { 'app-console:8080' : 1 }
68
70
} ,
69
71
timeout : {
70
72
connect : 600 ,
@@ -88,7 +90,7 @@ function initSysApiRoute() {
88
90
hosts : [ Config . SYS_CLIENT_HOST ] ,
89
91
upstream : {
90
92
type : 'roundrobin' ,
91
- nodes : { 'system-server:9000' : 1 }
93
+ nodes : { 'system-server:9000' : 1 }
92
94
} ,
93
95
priority : 9 ,
94
96
timeout : {
@@ -113,7 +115,7 @@ function initOssRoute() {
113
115
hosts : [ Config . DEPLOY_OSS_DOMAIN ] ,
114
116
upstream : {
115
117
type : 'roundrobin' ,
116
- nodes : { 'oss:9000' : 1 }
118
+ nodes : { 'oss:9000' : 1 }
117
119
} ,
118
120
timeout : {
119
121
connect : 600 ,
@@ -132,7 +134,7 @@ function initOssSubDomainRoute() {
132
134
hosts : [ '*.' + Config . DEPLOY_OSS_DOMAIN ] ,
133
135
upstream : {
134
136
type : 'roundrobin' ,
135
- nodes : { 'oss:9000' : 1 }
137
+ nodes : { 'oss:9000' : 1 }
136
138
} ,
137
139
priority : 0 ,
138
140
timeout : {
0 commit comments