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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
| # 安全配置
| security:
| # 防止XSS攻击
| xss:
| enabled: true
| excludeUrls:
| - /system/notice
| # 不校验白名单
| ignore:
| whites:
| - /auth/code
| - /auth/logout
| - /auth/login
| - /auth/binding/*
| - /auth/social/callback
| - /auth/register
| - /auth/tenant/list
| - /resource/sms/code
| - /*/v3/api-docs
| - /*/error
| - /csrf
|
| spring:
| cloud:
| # 网关配置
| gateway:
| # 打印请求日志(自定义)
| requestLog: true
| discovery:
| locator:
| lowerCaseServiceId: true
| enabled: true
| routes:
| # 认证中心
| - id: ruoyi-auth
| uri: lb://ruoyi-auth
| predicates:
| - Path=/auth/**
| filters:
| - StripPrefix=1
| # 代码生成
| - id: ruoyi-gen
| uri: lb://ruoyi-gen
| predicates:
| - Path=/tool/**
| filters:
| - StripPrefix=1
| # 系统模块
| - id: ruoyi-system
| uri: lb://ruoyi-system
| predicates:
| - Path=/system/**,/monitor/**
| filters:
| - StripPrefix=1
| # 资源服务
| - id: ruoyi-resource
| uri: lb://ruoyi-resource
| predicates:
| - Path=/resource/**
| filters:
| - StripPrefix=1
| # 演示服务
| - id: ruoyi-demo
| uri: lb://ruoyi-demo
| predicates:
| - Path=/demo/**
| filters:
| - StripPrefix=1
| # MQ演示服务
| - id: ruoyi-stream-mq
| uri: lb://ruoyi-stream-mq
| predicates:
| - Path=/stream-mq/**
| filters:
| - StripPrefix=1
|
| # sentinel 配置
| sentinel:
| filter:
| enabled: false
| # nacos配置持久化
| datasource:
| ds1:
| nacos:
| server-addr: ${spring.cloud.nacos.server-addr}
| dataId: sentinel-${spring.application.name}.json
| groupId: ${spring.cloud.nacos.config.group}
| namespace: ${spring.profiles.active}
| data-type: json
| rule-type: gw-flow
|
|