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 Nacos, ignore the follow config
|
2020-11-20 17:16:05 +08:00
|
|
|
################################################## Nacos config start ###################################################
|
2020-11-06 17:35:55 +08:00
|
|
|
nacos:
|
|
|
|
|
config:
|
|
|
|
|
# if use Nacos config set this flag to true
|
2020-11-20 17:16:05 +08:00
|
|
|
enabled: false #use Nacos Config? (default:false)
|
2020-11-06 17:35:55 +08:00
|
|
|
# need replace
|
2020-11-20 17:16:05 +08:00
|
|
|
server-addr: localhost:8848 #please input the nacos config server-addr (default:localhost:8848)
|
2020-11-06 17:35:55 +08:00
|
|
|
auto-refresh: true
|
2020-11-20 17:16:05 +08:00
|
|
|
group: fizz-gateway #please input the nacos config group (default:fizz-gateway)
|
|
|
|
|
data-id: application #please input the nacos config data-id (default:application)
|
|
|
|
|
type: PROPERTIES #please input the nacos config type (default:PROPERTIES)
|
2020-11-06 17:35:55 +08:00
|
|
|
# need replace
|
2020-11-20 17:16:05 +08:00
|
|
|
namespace: null #please input the nacos config type (default:null)
|
2020-11-06 17:35:55 +08:00
|
|
|
discovery:
|
|
|
|
|
# if use Nacos discovery set this flag to true
|
2020-11-20 17:16:05 +08:00
|
|
|
enabled: false #use Nacos Discovery? (default:false)
|
2020-11-06 17:35:55 +08:00
|
|
|
# need replace
|
2020-11-20 17:16:05 +08:00
|
|
|
server-addr: localhost:8848 #please input the nacos discovery server-addr (default:localhost:8848)
|
2020-11-06 17:35:55 +08:00
|
|
|
auto-register: true
|
2020-11-12 14:33:51 +08:00
|
|
|
register:
|
2020-11-20 17:16:05 +08:00
|
|
|
group-name: fizz-gateway #please input the nacos discovery register group-name (default:fizz-gateway)
|
|
|
|
|
################################################### Nacos 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
|
2020-09-02 18:35:03 +08:00
|
|
|
|
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-04-01 11:06:10 +08:00
|
|
|
database: 10 #please input the redis database (default:9)
|
2020-11-06 17:35:55 +08:00
|
|
|
proxy-webclient:
|
|
|
|
|
name: proxy
|
|
|
|
|
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
|
|
|
|
|
rpc-service-enabled: true
|