You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
2.4 KiB
YAML
101 lines
2.4 KiB
YAML
3 years ago
|
# 安全配置
|
||
|
security:
|
||
|
# 验证码
|
||
|
captcha:
|
||
|
# 是否开启验证码
|
||
|
enabled: true
|
||
|
# 验证码类型 math 数组计算 char 字符验证
|
||
|
type: MATH
|
||
|
# line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
|
||
|
category: CIRCLE
|
||
|
# 数字验证码位数
|
||
|
numberLength: 1
|
||
|
# 字符验证码长度
|
||
|
charLength: 4
|
||
|
# 防止XSS攻击
|
||
|
xss:
|
||
|
enabled: true
|
||
|
excludeUrls:
|
||
|
- /system/notice
|
||
|
# 不校验白名单
|
||
|
ignore:
|
||
|
whites:
|
||
3 years ago
|
- /code
|
||
3 years ago
|
- /auth/logout
|
||
|
- /auth/login
|
||
3 years ago
|
- /auth/smsLogin
|
||
|
- /auth/xcxLogin
|
||
3 years ago
|
- /auth/register
|
||
3 years ago
|
- /resource/sms/code
|
||
3 years ago
|
- /*/v3/api-docs
|
||
3 years ago
|
- /csrf
|
||
|
|
||
|
spring:
|
||
|
cloud:
|
||
|
# 网关配置
|
||
|
gateway:
|
||
3 years ago
|
# 打印请求日志(自定义)
|
||
|
requestLog: true
|
||
3 years ago
|
discovery:
|
||
|
locator:
|
||
|
lowerCaseServiceId: true
|
||
|
enabled: true
|
||
|
routes:
|
||
|
# 认证中心
|
||
|
- id: ruoyi-auth
|
||
|
uri: lb://ruoyi-auth
|
||
|
predicates:
|
||
|
- Path=/auth/**
|
||
|
filters:
|
||
|
# 验证码处理
|
||
|
- ValidateCodeFilter
|
||
|
- StripPrefix=1
|
||
|
# 代码生成
|
||
|
- id: ruoyi-gen
|
||
|
uri: lb://ruoyi-gen
|
||
|
predicates:
|
||
|
- Path=/code/**
|
||
|
filters:
|
||
|
- StripPrefix=1
|
||
|
# 系统模块
|
||
|
- id: ruoyi-system
|
||
|
uri: lb://ruoyi-system
|
||
|
predicates:
|
||
|
- Path=/system/**
|
||
|
filters:
|
||
|
- StripPrefix=1
|
||
3 years ago
|
# 资源服务
|
||
|
- id: ruoyi-resource
|
||
|
uri: lb://ruoyi-resource
|
||
3 years ago
|
predicates:
|
||
3 years ago
|
- Path=/resource/**
|
||
3 years ago
|
filters:
|
||
|
- StripPrefix=1
|
||
3 years ago
|
# 演示服务
|
||
|
- id: ruoyi-demo
|
||
|
uri: lb://ruoyi-demo
|
||
|
predicates:
|
||
|
- Path=/demo/**
|
||
|
filters:
|
||
|
- StripPrefix=1
|
||
3 years ago
|
# MQ演示服务
|
||
|
- id: ruoyi-stream-mq
|
||
|
uri: lb://ruoyi-stream-mq
|
||
|
predicates:
|
||
|
- Path=/stream-mq/**
|
||
|
filters:
|
||
|
- StripPrefix=1
|
||
3 years ago
|
|
||
|
# sentinel 配置
|
||
|
sentinel:
|
||
|
# nacos配置持久化
|
||
|
datasource:
|
||
|
ds1:
|
||
|
nacos:
|
||
|
server-addr: ${spring.cloud.nacos.server-addr}
|
||
3 years ago
|
dataId: sentinel-${spring.application.name}.json
|
||
3 years ago
|
groupId: ${spring.cloud.nacos.config.group}
|
||
3 years ago
|
namespace: ${spring.profiles.active}
|
||
3 years ago
|
data-type: json
|
||
3 years ago
|
rule-type: flow
|