mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-19 09:55:16 +08:00
154 lines
4.2 KiB
YAML
154 lines
4.2 KiB
YAML
# 安全配置
|
||
security:
|
||
# 不校验白名单
|
||
ignore:
|
||
whites:
|
||
- /auth/code
|
||
- /auth/logout
|
||
- /auth/login
|
||
- /auth/binding/*
|
||
- /auth/social/callback
|
||
- /auth/register
|
||
- /auth/tenant/list
|
||
- /resource/sms/code
|
||
- /resource/sse/close
|
||
- /*/v3/api-docs
|
||
- /*/error
|
||
- /csrf
|
||
- /sso/getSsoAuthUrl
|
||
- /sso/isLogin
|
||
- /sso/doLoginByTicket
|
||
|
||
spring:
|
||
data:
|
||
redis:
|
||
host: 127.0.0.1 # Redis服务器地址
|
||
database: 0 # Redis数据库索引(默认为0)
|
||
port: 6379 # Redis服务器连接端口
|
||
password: Lzw8800580/
|
||
# 连接超时时间
|
||
timeout: 10s
|
||
# 是否开启ssl
|
||
ssl.enabled: false
|
||
cloud:
|
||
nacos:
|
||
# nacos 服务地址
|
||
server-addr: http://127.0.0.1:8848
|
||
discovery:
|
||
# 注册组
|
||
group: DUBBO_GROUP
|
||
namespace: c5c00044-93e6-4e66-8060-3f39aa7ab82b
|
||
# 网关配置
|
||
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
|
||
# workflow服务
|
||
- id: ruoyi-workflow
|
||
uri: lb://ruoyi-workflow
|
||
predicates:
|
||
- Path=/workflow/**
|
||
# 演示服务
|
||
- id: ruoyi-demo
|
||
uri: lb://ruoyi-demo
|
||
predicates:
|
||
- Path=/demo/**
|
||
filters:
|
||
- StripPrefix=1
|
||
# MQ演示服务
|
||
- id: ruoyi-h5
|
||
uri: lb://ruoyi-h5
|
||
predicates:
|
||
- Path=/ruoyi-h5/**
|
||
filters:
|
||
- StripPrefix=1
|
||
|
||
|
||
# sa-token配置
|
||
sa-token:
|
||
sign:
|
||
# API client和server之间调用 接口签名秘钥 (随便乱摁几个字母即可)
|
||
secret-key: kQwIOrYbtXmSDkwEiFngrKidMcdrgKor
|
||
# token名称 (同时也是cookie名称)
|
||
token-name: Authorization
|
||
# 允许从 header 读取 token
|
||
is-read-header: true
|
||
# 关闭 cookie 鉴权 从根源杜绝 csrf 漏洞风险
|
||
is-read-cookie: false
|
||
# 允许从 请求参数 读取 token
|
||
is-read-body: true
|
||
# 在多人登录同一账号时,是否共用一个token (为true(默认)时所有登录共用一个token, 为false时每次登录新建一个token),这个为false会导致登陆多次后redis内存的token不能很好释放
|
||
is-share: false
|
||
# SSO-相关配置
|
||
sso-client:
|
||
# SSO-Server 端主机地址
|
||
server-url: http://sa-sso-server.com:19000
|
||
auth-url: http://sa-sso-server.com:8701/?mode=ticket#/sso-login
|
||
# SSO-Server 端校验ticket地址
|
||
check-ticket-url: http://ruoyi-sso-server:19000
|
||
# pc 客户端id
|
||
client: e5cd7e4891bf95d1d19206ce24a7b32e
|
||
#jwt密钥
|
||
jwt-secret-key: abcdcosctlklmnopqrstuvwxyz
|
||
token-prefix: Bearer
|
||
|
||
# 配置Sa-Token单独使用的Redis连接 (此处需要和SSO-Server端连接同一个Redis)
|
||
alone-redis:
|
||
# Redis数据库索引 (默认为0)
|
||
database: ${spring.data.redis.database}
|
||
# Redis服务器地址
|
||
host: ${spring.data.redis.host}
|
||
# Redis服务器连接端口
|
||
port: ${spring.data.redis.port}
|
||
# Redis服务器连接密码(默认为空)
|
||
password: ${spring.data.redis.password}
|
||
# 连接超时时间
|
||
timeout: ${spring.data.redis.timeout}
|
||
lettuce:
|
||
pool:
|
||
# 连接池最大连接数
|
||
max-active: 200
|
||
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||
max-wait: -1ms
|
||
# 连接池中的最大空闲连接
|
||
max-idle: 10
|
||
# 连接池中的最小空闲连接
|
||
min-idle: 1
|
||
|
||
# 多租户配置
|
||
tenant:
|
||
# 是否开启
|
||
enable: false
|