2020-11-06 17:35:55 +08:00
|
|
|
# if you do not use Apollo, ignore the follow config
|
2020-11-20 17:16:05 +08:00
|
|
|
################################################## Apollo config start ##################################################
|
2020-11-06 17:35:55 +08:00
|
|
|
apollo:
|
|
|
|
|
# if use Apollo set this flag to true
|
2020-11-20 17:16:05 +08:00
|
|
|
enabled: false #use Apollo? (default:false)
|
2020-11-06 17:35:55 +08:00
|
|
|
bootstrap:
|
|
|
|
|
# if use Apollo set this flag to true
|
2020-11-20 17:16:05 +08:00
|
|
|
enabled: false #use Apollo?
|
|
|
|
|
namespaces: application #please input the apollo bootstrap namespaces (default:application)
|
2020-11-06 17:35:55 +08:00
|
|
|
eagerLoad:
|
|
|
|
|
# if use Apollo set this flag to true
|
2020-11-20 17:16:05 +08:00
|
|
|
enabled: false #use Apollo?
|
|
|
|
|
################################################### Apollo config end ###################################################
|
2020-09-02 18:35:03 +08:00
|
|
|
|
2020-11-06 17:35:55 +08:00
|
|
|
# if you do not use Eureka, ignore the follow config
|
2020-11-20 17:16:05 +08:00
|
|
|
################################################## Eureka config start ##################################################
|
2020-11-06 17:35:55 +08:00
|
|
|
eureka:
|
|
|
|
|
client:
|
|
|
|
|
# if use Eureka set this flag to true
|
2020-11-20 17:16:05 +08:00
|
|
|
enabled: false #use Eureka? (default:false)
|
2020-11-06 17:35:55 +08:00
|
|
|
serviceUrl:
|
|
|
|
|
# need replace
|
2020-11-20 17:16:05 +08:00
|
|
|
defaultZone: http://localhost:6600/eureka/ #please input the eureka client serviceUrl defaultZone (default:http://localhost:6600/eureka/)
|
2020-11-06 17:35:55 +08:00
|
|
|
instance:
|
|
|
|
|
prefer-ip-address: true
|
2020-11-20 17:16:05 +08:00
|
|
|
################################################### Eureka config end ###################################################
|
2020-09-02 18:35:03 +08:00
|
|
|
|
2020-11-06 17:35:55 +08:00
|
|
|
server:
|
|
|
|
|
port: 8600
|
|
|
|
|
spring:
|
|
|
|
|
profiles:
|
|
|
|
|
active: dev
|
|
|
|
|
application:
|
|
|
|
|
name: fizz-gateway
|
2021-04-08 21:29:23 +08:00
|
|
|
main:
|
|
|
|
|
allow-bean-definition-overriding: true
|
2020-11-06 17:35:55 +08:00
|
|
|
cloud:
|
|
|
|
|
loadbalancer:
|
|
|
|
|
ribbon:
|
|
|
|
|
enabled: false
|
2021-06-08 14:29:27 +08:00
|
|
|
nacos:
|
|
|
|
|
discovery:
|
|
|
|
|
# if use Nacos discovery set this flag to true
|
|
|
|
|
enabled: false #use Nacos Discovery? (default:false)
|
|
|
|
|
# need replace
|
|
|
|
|
server-addr: localhost:8848 #please input the nacos discovery server-addr (default:localhost:8848)
|
|
|
|
|
namespace: null #please input the nacos config type (default:null)
|
2021-08-10 14:57:02 +08:00
|
|
|
group: DEFAULT_GROUP #please input the nacos discovery register group (default:DEFAULT_GROUP)
|
2020-09-02 18:35:03 +08:00
|
|
|
|
2021-06-08 16:55:59 +08:00
|
|
|
# Must use the same Redis as fizz-manager
|
2020-11-06 17:35:55 +08:00
|
|
|
aggregate:
|
|
|
|
|
redis:
|
|
|
|
|
# need replace
|
2021-04-08 21:29:23 +08:00
|
|
|
host: 6.6.6.6 #please input the redis host (default:localhost)
|
2020-11-06 17:35:55 +08:00
|
|
|
# need replace
|
2020-11-20 17:16:05 +08:00
|
|
|
port: 6379 #please input the redis port (default:6379)
|
2020-11-06 17:35:55 +08:00
|
|
|
# need replace
|
2020-11-20 17:16:05 +08:00
|
|
|
password: 123456 #please input the redis password (default:123456)
|
2020-11-06 17:35:55 +08:00
|
|
|
# need replace
|
2021-06-15 11:26:48 +08:00
|
|
|
database: 9 #please input the redis database (default:9)
|
2020-11-06 17:35:55 +08:00
|
|
|
proxy-webclient:
|
|
|
|
|
name: proxy
|
2021-08-18 11:19:34 +08:00
|
|
|
trust-insecure-SSL: false
|
2020-11-06 17:35:55 +08:00
|
|
|
aggr-webclient:
|
|
|
|
|
name: aggr
|
|
|
|
|
fizz-web-client:
|
|
|
|
|
timeout: 20000
|
2021-03-30 11:52:12 +08:00
|
|
|
fizz-dubbo-client:
|
|
|
|
|
address: zookeeper://127.0.0.1:2181
|
2020-11-06 17:35:55 +08:00
|
|
|
log:
|
2021-03-30 11:52:12 +08:00
|
|
|
headers: COOKIE,FIZZ-APPID,FIZZ-SIGN,FIZZ-TS,FIZZ-RSV,HOST
|
2020-11-24 18:42:35 +08:00
|
|
|
|
|
|
|
|
stat:
|
|
|
|
|
# switch for push access stat data
|
2021-05-12 16:16:34 +08:00
|
|
|
open: false
|
2020-12-16 11:49:18 +08:00
|
|
|
send-log:
|
|
|
|
|
# switch for push log data
|
2021-01-18 19:44:35 +08:00
|
|
|
open: true
|
|
|
|
|
sched:
|
|
|
|
|
executors: 2
|
|
|
|
|
flowControl: true
|
|
|
|
|
flow-stat-sched:
|
|
|
|
|
cron: 2/10 * * * * ?
|
|
|
|
|
dest: redis
|
2021-03-30 11:52:12 +08:00
|
|
|
queue: fizz_resource_access_stat
|
|
|
|
|
|
|
|
|
|
gateway:
|
|
|
|
|
prefix: /proxy
|
|
|
|
|
aggr:
|
|
|
|
|
# set headers when calling the backend API
|
2021-06-04 15:08:25 +08:00
|
|
|
proxy_set_headers: X-Real-IP,X-Forwarded-Proto,X-Forwarded-For
|
2021-05-08 17:26:56 +08:00
|
|
|
|
|
|
|
|
refresh-local-cache:
|
|
|
|
|
# initial delay 5 minutes
|
|
|
|
|
initial-delay-millis: 300000
|
|
|
|
|
# fixed rate 5 minutes
|
|
|
|
|
fixed-rate-millis: 300000
|
|
|
|
|
api-config-enabled: true
|
|
|
|
|
api-config-2-apps-enabled: true
|
|
|
|
|
aggregate-config-enabled: true
|
|
|
|
|
gateway-group-enabled: true
|
|
|
|
|
app-auth-enabled: true
|
|
|
|
|
flow-control-rule-enabled: true
|
2021-08-23 16:29:50 +08:00
|
|
|
rpc-service-enabled: true
|
|
|
|
|
|
|
|
|
|
fizz:
|
2021-10-23 12:05:35 +08:00
|
|
|
|
2021-08-23 16:29:50 +08:00
|
|
|
aggregate:
|
2021-09-26 20:26:03 +08:00
|
|
|
writeMapNullValue: false
|
2021-10-23 12:05:35 +08:00
|
|
|
|
2021-10-09 10:19:11 +08:00
|
|
|
error:
|
|
|
|
|
response:
|
2021-10-23 12:05:35 +08:00
|
|
|
http-status.enable: true
|
|
|
|
|
code-field: "msgCode"
|
|
|
|
|
message-field: "message"
|
|
|
|
|
|
|
|
|
|
api.pairing:
|
|
|
|
|
enable: false
|
|
|
|
|
web-server.port: 8601
|
|
|
|
|
request:
|
|
|
|
|
timeliness: 300 # default 300 sec
|
|
|
|
|
timeout: 0 # default no timeout
|
|
|
|
|
retry-count: 0 # default no retry
|
|
|
|
|
retry-interval: 0 # default no retry interval
|
2021-09-26 20:26:03 +08:00
|
|
|
|
|
|
|
|
fizz-trace-id:
|
2021-10-23 12:05:35 +08:00
|
|
|
header: X-Trace-Id
|
2021-10-09 10:19:11 +08:00
|
|
|
value-strategy: requestId # default, or can be uuid
|
2021-10-23 12:05:35 +08:00
|
|
|
value-prefix: fizz
|
2021-09-27 17:28:30 +08:00
|
|
|
|
|
|
|
|
cors: true # CORS switch, default true
|