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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
spring:
  data:
    redis:
      host: localhost
      port: 6379
      password:
  cloud:
    gateway:
      server:
        webflux:
          routes:
            # 认证中心
            - id: ruoyi-auth
              uri: lb://ruoyi-auth
              predicates:
                - Path=/auth/**
              filters:
                # 验证码处理
                - name: CacheRequestBody
                  args:
                    bodyClass: java.lang.String
                - ValidateCodeFilter
                - StripPrefix=1
            # 代码生成
            - id: ruoyi-gen
              uri: lb://ruoyi-gen
              predicates:
                - Path=/code/**
              filters:
                - StripPrefix=1
            # 定时任务
            - id: ruoyi-job
              uri: lb://ruoyi-job
              predicates:
                - Path=/schedule/**
              filters:
                - StripPrefix=1
            # 系统模块
            - id: ruoyi-system
              uri: lb://ruoyi-system
              predicates:
                - Path=/system/**
              filters:
                - StripPrefix=1
            # 文件服务
            - id: ruoyi-file
              uri: lb://ruoyi-file
              predicates:
                - Path=/file/**
              filters:
                - StripPrefix=1
            # 小程序 - 认证(用户端 + 服务商端共用;不挂 ValidateCodeFilter)
            - id: ruoyi-miniapp-auth
              uri: lb://ruoyi-auth
              predicates:
                - Path=/miniapp/auth/**
              filters:
                - StripPrefix=2
            # 小程序 - 会员
            - id: ruoyi-miniapp-user
              uri: lb://ruoyi-user
              predicates:
                - Path=/miniapp/account/**
              filters:
                - StripPrefix=2
            # 小程序 - 商品/订单
            - id: ruoyi-miniapp-product
              uri: lb://ruoyi-product
              predicates:
                - Path=/miniapp/product/**
              filters:
                - StripPrefix=2
            # 小程序 - 系统信息
            - id: ruoyi-miniapp-system
              uri: lb://ruoyi-system
              predicates:
                - Path=/miniapp/system/**
              filters:
                - StripPrefix=2
            # 会员服务(补齐,兼容前端 /account 前缀)
            - id: ruoyi-user
              uri: lb://ruoyi-user
              predicates:
                - Path=/account/**
              filters:
                - StripPrefix=1
 
# 安全配置
security:
  # 验证码
  captcha:
    enabled: true
    type: math
  # 防止XSS攻击
  xss:
    enabled: true
    excludeUrls:
      - /system/notice
 
  # 不校验白名单
  ignore:
    whites:
      - /auth/logout
      - /auth/login
      - /auth/register
      - /miniapp/auth/sms/code
      - /miniapp/auth/phone/login
      - /miniapp/auth/phone/code-login
      - /miniapp/auth/account/register
      - /*/v2/api-docs
      - /*/v3/api-docs
      - /csrf
 
# springdoc配置
springdoc:
  webjars:
    # 访问前缀
    prefix: